PK v
CVT phpunit.xml.distnu W+A
./Tests
benchmark
.
./Resources
./Tests
PK v
CVY~V % Tests/Mapping/MetadataFactoryTest.phpnu W+A
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Doctrine\Bundle\DoctrineBundle\Tests;
use Doctrine\Bundle\DoctrineBundle\Tests\TestCase;
use Doctrine\Bundle\DoctrineBundle\Mapping\MetadataFactory;
use Doctrine\Bundle\DoctrineBundle\Mapping\ClassMetadataCollection;
use Doctrine\ORM\Mapping\ClassMetadataInfo;
class MetadataFactoryTest extends TestCase
{
protected function setUp()
{
parent::setUp();
if (!class_exists('Doctrine\\ORM\\Version')) {
$this->markTestSkipped('Doctrine ORM is not available.');
}
}
public function testFindNamespaceAndPathForMetadata()
{
$class = new ClassMetadataInfo(__CLASS__);
$collection = new ClassMetadataCollection(array($class));
$registry = $this->getMock('Doctrine\Common\Persistence\ManagerRegistry');
$factory = new MetadataFactory($registry);
$this->setExpectedException("RuntimeException", "Can't find base path for \"Doctrine\Bundle\DoctrineBundle\Tests\MetadataFactoryTest");
$factory->findNamespaceAndPathForMetadata($collection);
}
}
PK v
CVi*sX X Tests/BundleTest.phpnu W+A
* (c) Doctrine Project, Benjamin Eberlei
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Doctrine\Bundle\DoctrineBundle\Tests;
use Symfony\Bridge\Doctrine\DependencyInjection\CompilerPass\DoctrineValidationPass;
use Symfony\Bridge\Doctrine\DependencyInjection\CompilerPass\RegisterEventListenersAndSubscribersPass;
use Symfony\Component\DependencyInjection\ContainerBuilder;
use Doctrine\Bundle\DoctrineBundle\DoctrineBundle;
class BundleTest extends \PHPUnit_Framework_TestCase
{
public function testBuildCompilerPasses()
{
$container = new ContainerBuilder();
$bundle = new DoctrineBundle();
$bundle->build($container);
$config = $container->getCompilerPassConfig();
$passes = $config->getBeforeOptimizationPasses();
$foundEventListener = false;
$foundValidation = false;
foreach ($passes as $pass) {
if ($pass instanceof RegisterEventListenersAndSubscribersPass) {
$foundEventListener = true;
} elseif ($pass instanceof DoctrineValidationPass) {
$foundValidation = true;
}
}
$this->assertTrue($foundEventListener, 'RegisterEventListenersAndSubcribersPass was not found');
$this->assertTrue($foundValidation, 'DoctrineValidationPass was not found');
}
}
PK v
CV 0 Tests/DependencyInjection/TestStringFunction.phpnu W+A
* (c) Doctrine Project, Benjamin Eberlei
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Doctrine\Bundle\DoctrineBundle\Tests\DependencyInjection;
use Doctrine\ORM\Query\AST\Functions\FunctionNode;
use Doctrine\ORM\Query\SqlWalker;
use Doctrine\ORM\Query\Parser;
class TestStringFunction extends FunctionNode
{
public function getSql(SqlWalker $sqlWalker)
{
return '';
}
public function parse(Parser $parser)
{
return '';
}
}
PK v
CVY 1 Tests/DependencyInjection/TestNumericFunction.phpnu W+A
* (c) Doctrine Project, Benjamin Eberlei
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Doctrine\Bundle\DoctrineBundle\Tests\DependencyInjection;
use Doctrine\ORM\Query\AST\Functions\FunctionNode;
use Doctrine\ORM\Query\SqlWalker;
use Doctrine\ORM\Query\Parser;
class TestNumericFunction extends FunctionNode
{
public function getSql(SqlWalker $sqlWalker)
{
return '';
}
public function parse(Parser $parser)
{
return '';
}
}
PK v
CVW 6 Tests/DependencyInjection/XmlDoctrineExtensionTest.phpnu W+A
* (c) Doctrine Project, Benjamin Eberlei
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Doctrine\Bundle\DoctrineBundle\Tests\DependencyInjection;
use Symfony\Component\DependencyInjection\ContainerBuilder;
use Symfony\Component\DependencyInjection\Loader\XmlFileLoader;
use Symfony\Component\Config\FileLocator;
class XmlDoctrineExtensionTest extends AbstractDoctrineExtensionTest
{
protected function loadFromFile(ContainerBuilder $container, $file)
{
$loadXml = new XmlFileLoader($container, new FileLocator(__DIR__.'/Fixtures/config/xml'));
$loadXml->load($file.'.xml');
}
}
PK v
CVFm? ? > Tests/DependencyInjection/Fixtures/config/yml/dbal_logging.ymlnu W+A doctrine:
dbal:
default_connection: mysql
connections:
log:
logging: true
profiling: false
profile:
logging: false
profiling: true
both:
logging: true
profiling: true
PK v
CVt t D Tests/DependencyInjection/Fixtures/config/yml/orm_hydration_mode.ymlnu W+A doctrine:
dbal:
default_connection: default
connections:
default:
dbname: db
orm:
entity_managers:
default:
hydrators:
test_hydrator: Symfony\Bundle\DoctrineBundle\Tests\DependencyInjection\TestHydrator
mappings:
YamlBundle: ~
PK v
CVep ? Tests/DependencyInjection/Fixtures/config/yml/orm_functions.ymlnu W+A doctrine:
dbal:
default_connection: default
connections:
default:
dbname: db
orm:
entity_managers:
default:
mappings:
YamlBundle: ~
dql:
string_functions:
test_string: Symfony\Bundle\DoctrineBundle\Tests\DependencyInjection\TestStringFunction
numeric_functions:
test_numeric: Symfony\Bundle\DoctrineBundle\Tests\DependencyInjection\TestNumericFunction
datetime_functions:
test_datetime: Symfony\Bundle\DoctrineBundle\Tests\DependencyInjection\TestDatetimeFunction
PK v
CV|p p = Tests/DependencyInjection/Fixtures/config/yml/orm_imports.ymlnu W+A imports:
- { resource: orm_imports_import.yml }
doctrine:
orm:
auto_generate_proxy_classes: true
PK v
CVx S Tests/DependencyInjection/Fixtures/config/yml/dbal_service_multiple_connections.ymlnu W+A doctrine:
dbal:
default_connection: mysql
connections:
mysql:
dbname: mysql_db
user: mysql_user
password: mysql_s3cr3t
unix_socket: /path/to/mysqld.sock
sqlite:
driver: pdo_sqlite
memory: true
oci:
driver: oci8
dbname: oracle_db
user: oracle_user
password: oracle_s3cr3t
charset: utf8
PK v
CVsu D Tests/DependencyInjection/Fixtures/config/yml/orm_namingstrategy.ymlnu W+A doctrine:
dbal:
default_connection: default
connections:
default:
dbname: db
orm:
default_entity_manager: em1
entity_managers:
em1:
mappings:
YamlBundle: ~
naming_strategy: doctrine.orm.naming_strategy.default
em2:
mappings:
YamlBundle: ~
naming_strategy: doctrine.orm.naming_strategy.underscore
PK v
CVI <