Skip to content

Commit

Permalink
Moved tests according to new Symfony 3 directory structure
Browse files Browse the repository at this point in the history
  • Loading branch information
manuelkiessling committed Dec 8, 2015
1 parent 90c9190 commit c7f5f2c
Show file tree
Hide file tree
Showing 21 changed files with 25 additions and 28 deletions.
9 changes: 3 additions & 6 deletions phpunit.xml.dist
Expand Up @@ -15,9 +15,7 @@

<testsuites>
<testsuite name="Project Test Suite">
<directory>src/*Bundle/Tests</directory>
<directory>src/*/*Bundle/Tests</directory>
<directory>src/*/Bundle/*Bundle/Tests</directory>
<directory>tests</directory>
</testsuite>
</testsuites>

Expand All @@ -27,12 +25,11 @@

<filter>
<whitelist>
<directory>../src</directory>
<directory>src</directory>
<exclude>
<directory>src/*Bundle/Resources</directory>
<directory>src/*/*Bundle/Resources</directory>
<directory>src/*/*Bundle/Tests</directory>
<directory>src/*/Bundle/*Bundle/Resources</directory>
<directory>src/*/Bundle/*Bundle/Tests</directory>
</exclude>
</whitelist>
</filter>
Expand Down
@@ -1,10 +1,10 @@
<?php

namespace AppBundle\Tests\Controller\Internal;
namespace Tests\ApiBundle\Controller\Internal;

use AppBundle\Entity\Testcase;
use AppBundle\Entity\User;
use AppBundle\Tests\TestHelpers;
use Tests\AppBundle\TestHelpers;
use Symfony\Bundle\FrameworkBundle\Test\WebTestCase;

class TestcasesApiControllerWebTest extends WebTestCase
Expand Down
@@ -1,11 +1,11 @@
<?php

namespace AppBundle\Tests\Controller;
namespace Tests\ApiBundle\Controller;

use AppBundle\Entity\Testresult;
use AppBundle\Entity\Testcase;
use AppBundle\Entity\User;
use AppBundle\Tests\TestHelpers;
use Tests\AppBundle\TestHelpers;
use Symfony\Bundle\FrameworkBundle\Test\WebTestCase;

class TestresultsApiControllerWebTest extends WebTestCase
Expand Down
@@ -1,6 +1,6 @@
<?php

namespace ApiBundle\Tests\Service;
namespace Tests\ApiBundle\Service;

use PHPUnit_Framework_TestCase;
use ApiBundle\Service\HarTransformerService;
Expand Down
@@ -1,6 +1,6 @@
<?php

namespace ApiBundle\Tests\Service;
namespace Tests\ApiBundle\Service;

use PHPUnit_Framework_TestCase;
use ApiBundle\Service\SeleneseRunnerLogAnalyzerService;
Expand Down
@@ -1,10 +1,10 @@
<?php

namespace AppBundle\Tests\Command;
namespace Tests\AppBundle\Command;

use AppBundle\Command\ImportStatisticsCommand;
use AppBundle\Entity\Testresult;
use AppBundle\Tests\TestHelpers;
use Tests\AppBundle\TestHelpers;
use Symfony\Bundle\FrameworkBundle\Console\Application;
use Symfony\Bundle\FrameworkBundle\Test\WebTestCase;
use Symfony\Component\Console\Tester\CommandTester;
Expand Down
@@ -1,6 +1,6 @@
<?php

namespace AppBundle\Tests\Controller;
namespace Tests\AppBundle\Controller;

use Symfony\Bundle\FrameworkBundle\Test\WebTestCase;

Expand Down
@@ -1,9 +1,9 @@
<?php

namespace AppBundle\Tests\Controller;
namespace Tests\AppBundle\Controller;

use AppBundle\Entity\Testresult;
use AppBundle\Tests\TestHelpers;
use Tests\AppBundle\TestHelpers;
use Doctrine\ORM\EntityManager;
use Symfony\Bundle\FrameworkBundle\Test\WebTestCase;

Expand Down
@@ -1,8 +1,8 @@
<?php

namespace AppBundle\Tests\Functional;
namespace Tests\AppBundle\Functional;

use AppBundle\Tests\TestHelpers;
use Tests\AppBundle\TestHelpers;
use Symfony\Bundle\FrameworkBundle\Test\WebTestCase;

class DemoModeFunctionalWebTest extends WebTestCase
Expand Down
@@ -1,8 +1,8 @@
<?php

namespace AppBundle\Tests\Functional;
namespace Tests\AppBundle\Functional;

use AppBundle\Tests\TestHelpers;
use Tests\AppBundle\TestHelpers;
use Symfony\Bundle\FrameworkBundle\Test\WebTestCase;

class HomepageFunctionalWebTest extends WebTestCase
Expand Down
@@ -1,8 +1,8 @@
<?php

namespace AppBundle\Tests\Functional;
namespace Tests\AppBundle\Functional;

use AppBundle\Tests\TestHelpers;
use Tests\AppBundle\TestHelpers;
use Symfony\Bundle\FrameworkBundle\Test\WebTestCase;

class LoggedInLoggedOutFunctionalWebTest extends WebTestCase
Expand Down
@@ -1,6 +1,6 @@
<?php

namespace AppBundle\Tests\Service;
namespace Tests\AppBundle\Service;

use AppBundle\Entity\User;
use AppBundle\Service\DemoService;
Expand Down
@@ -1,6 +1,6 @@
<?php

namespace AppBundle\Tests\Service;
namespace Tests\AppBundle\Service;

use AppBundle\Entity\User;
use AppBundle\Service\RegistrationService;
Expand Down Expand Up @@ -52,7 +52,7 @@ public function setUp()
{
$this->userManagerMock = $this->getMockBuilder('FOS\UserBundle\Doctrine\UserManager')
->disableOriginalConstructor()->getMock();
$this->loginManagerMock = $this->getMockBuilder('AppBundle\Tests\Stubs\LoginManagerStub')
$this->loginManagerMock = $this->getMockBuilder('Tests\AppBundle\Stubs\LoginManagerStub')
->disableOriginalConstructor()->getMock();
$this->encoderFactoryMock = $this->getMockBuilder('Symfony\Component\Security\Core\Encoder\EncoderFactory')
->disableOriginalConstructor()->getMock();
Expand Down
@@ -1,6 +1,6 @@
<?php

namespace AppBundle\Tests\Stubs;
namespace Tests\AppBundle\Stubs;

use FOS\UserBundle\Model\UserInterface;
use FOS\UserBundle\Security\LoginManagerInterface;
Expand Down
@@ -1,6 +1,6 @@
<?php

namespace AppBundle\Tests;
namespace Tests\AppBundle;

use Symfony\Bundle\FrameworkBundle\Console\Application;
use Symfony\Component\HttpKernel\KernelInterface;
Expand Down

0 comments on commit c7f5f2c

Please sign in to comment.