Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Move files to src and tests directory #324

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 10 additions & 10 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,14 @@ composer.lock
vendor

# Ignore files created during tests
/Tests/App/cache/
/Tests/App/logs/
/Tests/AppConfig/cache/
/Tests/AppConfig/logs/
/Tests/AppConfigLeanFramework/cache/
/Tests/AppConfigLeanFramework/logs/
/Tests/AppConfigMysql/cache/
/Tests/AppConfigMysql/logs/
/Tests/AppConfigPhpcr/cache/
/Tests/AppConfigPhpcr/logs/
/tests/App/cache/
/tests/App/logs/
/tests/AppConfig/cache/
/tests/AppConfig/logs/
/tests/AppConfigLeanFramework/cache/
/tests/AppConfigLeanFramework/logs/
/tests/AppConfigMysql/cache/
/tests/AppConfigMysql/logs/
/tests/AppConfigPhpcr/cache/
/tests/AppConfigPhpcr/logs/
/cov/
Empty file removed Tests/App/cache/.gitkeep
Empty file.
Empty file removed Tests/App/logs/.gitkeep
Empty file.
1 change: 0 additions & 1 deletion Tests/AppConfig/cache/.gitkeep

This file was deleted.

1 change: 0 additions & 1 deletion Tests/AppConfig/logs/.gitkeep

This file was deleted.

1 change: 0 additions & 1 deletion Tests/AppConfigMysql/cache/.gitkeep

This file was deleted.

1 change: 0 additions & 1 deletion Tests/AppConfigMysql/logs/.gitkeep

This file was deleted.

1 change: 0 additions & 1 deletion Tests/AppConfigPhpcr/cache/.gitkeep

This file was deleted.

1 change: 0 additions & 1 deletion Tests/AppConfigPhpcr/logs/.gitkeep

This file was deleted.

7 changes: 6 additions & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,12 @@
},
"autoload": {
"psr-4": {
"Liip\\FunctionalTestBundle\\": ""
"Liip\\FunctionalTestBundle\\": "src/"
}
},
"autoload-dev": {
"psr-4": {
"Liip\\FunctionalTestBundle\\Tests\\": "tests/"
}
},
"extra": {
Expand Down
12 changes: 6 additions & 6 deletions phpunit.xml.dist
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
xsi:noNamespaceSchemaLocation="http://schema.phpunit.de/3.7/phpunit.xsd"
backupGlobals="false"
backupStaticAttributes="false"
bootstrap="Tests/App/bootstrap.php"
bootstrap="tests/App/bootstrap.php"
colors="true"
convertErrorsToExceptions="true"
convertNoticesToExceptions="true"
Expand All @@ -19,15 +19,15 @@
>

<php>
<server name="KERNEL_DIR" value="Tests/App" />
<server name="KERNEL_DIR" value="tests/App" />
<env name="SYMFONY_DEPRECATIONS_HELPER" value="weak"/>
</php>

<testsuites>
<testsuite name="Project Test Suite">
<directory>Tests/Command</directory>
<directory>Tests/DependencyInjection</directory>
<directory>Tests/Test</directory>
<directory>tests/Command</directory>
<directory>tests/DependencyInjection</directory>
<directory>tests/Test</directory>
</testsuite>
</testsuites>

Expand All @@ -45,7 +45,7 @@
<directory>Utils</directory>
<directory>Validator</directory>
<exclude>
<directory>Tests</directory>
<directory>tests</directory>
<directory>vendor/</directory>
</exclude>
</whitelist>
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
1 change: 1 addition & 0 deletions Tests/App/AppKernel.php → tests/App/AppKernel.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ public function registerBundles()
new Doctrine\Bundle\DoctrineBundle\DoctrineBundle(),
new Doctrine\Bundle\FixturesBundle\DoctrineFixturesBundle(),
new Liip\FunctionalTestBundle\LiipFunctionalTestBundle(),
new Liip\FunctionalTestBundle\Tests\App\MyLiipFunctionalTestBundle\MyLiipFunctionalTestBundle(),
);

return $bundles;
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
* with this source code in the file LICENSE.
*/

namespace Liip\FunctionalTestBundle\Tests\App\DataFixtures\ORM;
namespace Liip\FunctionalTestBundle\Tests\App\MyLiipFunctionalTestBundle\DataFixtures\ORM;

use Doctrine\Common\DataFixtures\AbstractFixture;
use Doctrine\Common\DataFixtures\DependentFixtureInterface;
Expand Down Expand Up @@ -58,7 +58,7 @@ public function load(ObjectManager $manager)
public function getDependencies()
{
return array(
'Liip\FunctionalTestBundle\Tests\App\DataFixtures\ORM\LoadUserData',
'Liip\FunctionalTestBundle\Tests\App\MyLiipFunctionalTestBundle\DataFixtures\ORM\LoadUserData',
);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
* with this source code in the file LICENSE.
*/

namespace Liip\FunctionalTestBundle\Tests\App\DataFixtures\ORM;
namespace Liip\FunctionalTestBundle\Tests\App\MyLiipFunctionalTestBundle\DataFixtures\ORM;

use Doctrine\Common\DataFixtures\AbstractFixture;
use Doctrine\Common\DataFixtures\FixtureInterface;
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
<?php

/*
* This file is part of the Liip/FunctionalTestBundle
*
* (c) Lukas Kahwe Smith <[email protected]>
*
* This source file is subject to the MIT license that is bundled
* with this source code in the file LICENSE.
*/

namespace Liip\FunctionalTestBundle\Tests\App\MyLiipFunctionalTestBundle;

use Symfony\Component\HttpKernel\Bundle\Bundle;

class MyLiipFunctionalTestBundle extends Bundle
{
}
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ public function testLoadEmptyFixtures()
public function testLoadFixtures()
{
$fixtures = $this->loadFixtures(array(
'Liip\FunctionalTestBundle\Tests\App\DataFixtures\ORM\LoadUserData',
'Liip\FunctionalTestBundle\Tests\App\MyLiipFunctionalTestBundle\DataFixtures\ORM\LoadUserData',
));

$this->assertInstanceOf(
Expand Down Expand Up @@ -127,7 +127,7 @@ public function testLoadFixtures()
public function testLoadFixturesAndExcludeFromPurge()
{
$fixtures = $this->loadFixtures(array(
'Liip\FunctionalTestBundle\Tests\App\DataFixtures\ORM\LoadUserData',
'Liip\FunctionalTestBundle\Tests\App\MyLiipFunctionalTestBundle\DataFixtures\ORM\LoadUserData',
));

$this->assertInstanceOf(
Expand Down Expand Up @@ -167,7 +167,7 @@ public function testLoadFixturesAndExcludeFromPurge()
public function testLoadFixturesAndPurge()
{
$fixtures = $this->loadFixtures(array(
'Liip\FunctionalTestBundle\Tests\App\DataFixtures\ORM\LoadUserData',
'Liip\FunctionalTestBundle\Tests\App\MyLiipFunctionalTestBundle\DataFixtures\ORM\LoadUserData',
));

$this->assertInstanceOf(
Expand Down Expand Up @@ -197,7 +197,7 @@ public function testLoadFixturesAndPurge()

// Reload fixtures
$this->loadFixtures(array(
'Liip\FunctionalTestBundle\Tests\App\DataFixtures\ORM\LoadUserData',
'Liip\FunctionalTestBundle\Tests\App\MyLiipFunctionalTestBundle\DataFixtures\ORM\LoadUserData',
));

// Check that there are 2 users.
Expand Down Expand Up @@ -226,7 +226,7 @@ public function testLoadFixturesAndPurge()
public function testLoadFixturesFiles()
{
$fixtures = $this->loadFixtureFiles(array(
'@LiipFunctionalTestBundle/Tests/App/DataFixtures/ORM/user.yml',
__DIR__.'/../App/MyLiipFunctionalTestBundle/DataFixtures/ORM/user.yml',
));

$this->assertInternalType(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ public function testIndexAuthenticationTrue()
public function testIndexAuthenticationLoginAs()
{
$fixtures = $this->loadFixtures(array(
'Liip\FunctionalTestBundle\Tests\App\DataFixtures\ORM\LoadUserData',
'Liip\FunctionalTestBundle\Tests\App\MyLiipFunctionalTestBundle\DataFixtures\ORM\LoadUserData',
));

/** @var \Doctrine\Common\DataFixtures\ReferenceRepository $repository */
Expand Down Expand Up @@ -157,7 +157,7 @@ public function testIndexAuthenticationLoginAs()
public function testAllowedQueriesExceededException()
{
$fixtures = $this->loadFixtures(array(
'Liip\FunctionalTestBundle\Tests\App\DataFixtures\ORM\LoadUserData',
'Liip\FunctionalTestBundle\Tests\App\MyLiipFunctionalTestBundle\DataFixtures\ORM\LoadUserData',
));

/** @var \Doctrine\Common\DataFixtures\ReferenceRepository $repository */
Expand Down Expand Up @@ -188,7 +188,7 @@ public function testAllowedQueriesExceededException()
public function testAnnotationAndException()
{
$this->loadFixtures(array(
'Liip\FunctionalTestBundle\Tests\App\DataFixtures\ORM\LoadUserData',
'Liip\FunctionalTestBundle\Tests\App\MyLiipFunctionalTestBundle\DataFixtures\ORM\LoadUserData',
));

$this->client = static::makeClient();
Expand All @@ -213,7 +213,7 @@ public function testHautelookServiceUsage()
$this->getContainer()->set('hautelook_alice.fixtures.loader', $hautelookLoaderMock);

$this->loadFixtureFiles(array(
'@LiipFunctionalTestBundle/Tests/App/DataFixtures/ORM/user.yml',
__DIR__.'/../App/MyLiipFunctionalTestBundle/DataFixtures/ORM/user.yml',
));
}

Expand All @@ -233,7 +233,7 @@ public function testLoadFixturesFilesWithHautelook()
$this->getContainer()->set('hautelook_alice.fixtures.loader', $loader);

$fixtures = $this->loadFixtureFiles(array(
'@LiipFunctionalTestBundle/Tests/App/DataFixtures/ORM/user.yml',
__DIR__.'/../App/MyLiipFunctionalTestBundle/DataFixtures/ORM/user.yml',
));

$this->assertInternalType(
Expand Down Expand Up @@ -289,7 +289,7 @@ public function testLoadFixturesFilesWithHautelookCustomProvider()

// Load default Data Fixtures.
$fixtures = $this->loadFixtureFiles(array(
'@LiipFunctionalTestBundle/Tests/App/DataFixtures/ORM/user.yml',
__DIR__.'/../App/MyLiipFunctionalTestBundle/DataFixtures/ORM/user.yml',
));

$this->assertInternalType(
Expand All @@ -314,7 +314,7 @@ public function testLoadFixturesFilesWithHautelookCustomProvider()

// Load Data Fixtures with custom loader defined in configuration.
$fixtures = $this->loadFixtureFiles(array(
'@LiipFunctionalTestBundle/Tests/App/DataFixtures/ORM/user_with_custom_provider.yml',
__DIR__.'/../App/MyLiipFunctionalTestBundle/DataFixtures/ORM/user_with_custom_provider.yml',
));

/** @var \Liip\FunctionalTestBundle\Tests\App\Entity\User $user */
Expand All @@ -333,16 +333,16 @@ public function testLoadFixturesFilesWithHautelookCustomProvider()
public function testBackupIsRefreshed()
{
// This value is generated in loadFixtures().
$md5 = '0ded9d8daaeaeca1056b18b9d0d433b2';
$md5 = '99250645e387d7b8b6552284112ab794';

$fixtures = array(
'Liip\FunctionalTestBundle\Tests\App\DataFixtures\ORM\LoadDependentUserData',
'Liip\FunctionalTestBundle\Tests\App\MyLiipFunctionalTestBundle\DataFixtures\ORM\LoadDependentUserData',
);

$this->loadFixtures($fixtures);

$dependentFixtureFilePath = $this->getContainer()->get('kernel')->locateResource(
'@LiipFunctionalTestBundle/Tests/App/DataFixtures/ORM/LoadUserData.php'
'@MyLiipFunctionalTestBundle/DataFixtures/ORM/LoadUserData.php'
);

$dependentFixtureFilemtime = filemtime($dependentFixtureFilePath);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -283,7 +283,7 @@ public function testLoadEmptyFixtures()
public function testLoadFixtures()
{
$fixtures = $this->loadFixtures(array(
'Liip\FunctionalTestBundle\Tests\App\DataFixtures\ORM\LoadUserData',
'Liip\FunctionalTestBundle\Tests\App\MyLiipFunctionalTestBundle\DataFixtures\ORM\LoadUserData',
));

$this->assertInstanceOf(
Expand Down Expand Up @@ -341,7 +341,7 @@ public function testLoadFixtures()
public function testLoadDependentFixtures()
{
$fixtures = $this->loadFixtures(array(
'Liip\FunctionalTestBundle\Tests\App\DataFixtures\ORM\LoadDependentUserData',
'Liip\FunctionalTestBundle\Tests\App\MyLiipFunctionalTestBundle\DataFixtures\ORM\LoadDependentUserData',
));

$this->assertInstanceOf(
Expand All @@ -368,7 +368,7 @@ public function testLoadDependentFixtures()
public function testLoadFixturesFiles()
{
$fixtures = $this->loadFixtureFiles(array(
'@LiipFunctionalTestBundle/Tests/App/DataFixtures/ORM/user.yml',
__DIR__.'/../App/MyLiipFunctionalTestBundle/DataFixtures/ORM/user.yml',
));

$this->assertInternalType(
Expand Down Expand Up @@ -432,7 +432,7 @@ public function testLoadFixturesFilesPaths()
{
$fixtures = $this->loadFixtureFiles(array(
$this->client->getContainer()->get('kernel')->locateResource(
'@LiipFunctionalTestBundle/Tests/App/DataFixtures/ORM/user.yml'
'@MyLiipFunctionalTestBundle/DataFixtures/ORM/user.yml'
),
));

Expand Down Expand Up @@ -481,7 +481,7 @@ public function testLoadFixturesFilesPaths()
public function testLoadFixturesFilesPathsWithoutLocateResource()
{
$fixtures = $this->loadFixtureFiles(array(
dirname(__FILE__).'/../App/DataFixtures/ORM/user.yml',
dirname(__FILE__).'/../App/MyLiipFunctionalTestBundle/DataFixtures/ORM/user.yml',
));

$this->assertInternalType(
Expand Down Expand Up @@ -521,7 +521,7 @@ public function testLoadNonexistentFixturesFilesPaths()
public function testUserWithFixtures()
{
$fixtures = $this->loadFixtures(array(
'Liip\FunctionalTestBundle\Tests\App\DataFixtures\ORM\LoadUserData',
'Liip\FunctionalTestBundle\Tests\App\MyLiipFunctionalTestBundle\DataFixtures\ORM\LoadUserData',
));

$this->assertInstanceOf(
Expand Down