Commit b68a06526c857abd4d4966d86d54b24075aa90df
1 parent
5da8a96e
Exists in
master
and in
1 other branch
Controler de teste
Showing
1 changed file
with
52 additions
and
0 deletions
Show diff stats
src/Cacic/RelatorioBundle/Tests/Controller/HardwareControllerTest.php
0 → 100644
| @@ -0,0 +1,52 @@ | @@ -0,0 +1,52 @@ | ||
| 1 | +<?php | ||
| 2 | + | ||
| 3 | +namespace Cacic\RelatorioBundle\Tests\Controller; | ||
| 4 | + | ||
| 5 | +use Symfony\Bundle\FrameworkBundle\Test\WebTestCase; | ||
| 6 | + | ||
| 7 | +class HardwareControllerTest extends WebTestCase | ||
| 8 | +{ | ||
| 9 | + /** | ||
| 10 | + * Cria dados necessários aos testes | ||
| 11 | + */ | ||
| 12 | + | ||
| 13 | + public function setUp() { | ||
| 14 | + | ||
| 15 | + } | ||
| 16 | + | ||
| 17 | + /** | ||
| 18 | + * Testa login funcional | ||
| 19 | + */ | ||
| 20 | + | ||
| 21 | + public function testLogin() { | ||
| 22 | + | ||
| 23 | + } | ||
| 24 | + | ||
| 25 | + /** | ||
| 26 | + * Testa o controller que gerar a página inicial de um relatório WMI | ||
| 27 | + */ | ||
| 28 | + | ||
| 29 | + public function testWmiAction() { | ||
| 30 | + | ||
| 31 | + $client = static::createClient(); | ||
| 32 | + $crawler = $client->request( | ||
| 33 | + 'GET', | ||
| 34 | + '/relatorio/hardware/NetworkAdapterConfiguration', | ||
| 35 | + array(), | ||
| 36 | + array(), | ||
| 37 | + array(), | ||
| 38 | + '{}' | ||
| 39 | + ); | ||
| 40 | + | ||
| 41 | + $this->assertTrue($crawler->filter('option:contains("DefaultIPGateway")')->count() > 0); | ||
| 42 | + } | ||
| 43 | + | ||
| 44 | + | ||
| 45 | + /** | ||
| 46 | + * Remove dados de teste | ||
| 47 | + */ | ||
| 48 | + | ||
| 49 | + public function tearDown() { | ||
| 50 | + | ||
| 51 | + } | ||
| 52 | +} |