当前位置: 首页>>代码示例>>PHP>>正文


PHP Loader::isTransient方法代码示例

本文整理汇总了PHP中Doctrine\Common\DataFixtures\Loader::isTransient方法的典型用法代码示例。如果您正苦于以下问题:PHP Loader::isTransient方法的具体用法?PHP Loader::isTransient怎么用?PHP Loader::isTransient使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Doctrine\Common\DataFixtures\Loader的用法示例。


在下文中一共展示了Loader::isTransient方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: testLoader

 public function testLoader()
 {
     $loader = new Loader();
     $loader->addFixture($this->getMock('Doctrine\\Common\\DataFixtures\\FixtureInterface'), array(), array(), 'Mock1');
     $loader->addFixture($this->getMock('Doctrine\\Common\\DataFixtures\\FixtureInterface', array(), array(), 'Mock2'));
     $loader->addFixture($this->getMock('Doctrine\\Common\\DataFixtures\\SharedFixtureInterface', array(), array(), 'Mock3'));
     $this->assertEquals(3, count($loader->getFixtures()));
     $loader->loadFromDirectory(__DIR__ . '/TestFixtures');
     $this->assertEquals(7, count($loader->getFixtures()));
     $this->assertTrue($loader->isTransient('TestFixtures\\NotAFixture'));
     $this->assertFalse($loader->isTransient('TestFixtures\\MyFixture1'));
 }
开发者ID:robertowest,项目名称:CuteFlow-V4,代码行数:12,代码来源:LoaderTest.php

示例2: testLoader

    public function testLoader()
    {
        $loader = new Loader();
        $loader->addFixture($this->getMock('Doctrine\Common\DataFixtures\FixtureInterface'));
        $loader->addFixture($this->getMock('Doctrine\Common\DataFixtures\FixtureInterface'));

        $this->assertEquals(2, count($loader->getFixtures()));

        $loader->loadFromDirectory(__DIR__.'/TestFixtures');
        $this->assertEquals(4, count($loader->getFixtures()));
        $this->assertTrue($loader->isTransient('TestFixtures\NotAFixture'));
        $this->assertFalse($loader->isTransient('TestFixtures\MyFixture1'));
    }
开发者ID:roverwolf,项目名称:data-fixtures,代码行数:13,代码来源:LoaderTest.php

示例3: testLoadFromFile

 public function testLoadFromFile()
 {
     $loader = new Loader();
     $loader->addFixture($this->getMock('Doctrine\\Common\\DataFixtures\\FixtureInterface'), array(), array(), 'Mock1');
     $loader->addFixture($this->getMock('Doctrine\\Common\\DataFixtures\\FixtureInterface', array(), array(), 'Mock2'));
     $loader->addFixture($this->getMock('Doctrine\\Common\\DataFixtures\\SharedFixtureInterface', array(), array(), 'Mock3'));
     $this->assertCount(3, $loader->getFixtures());
     $loader->loadFromFile(__DIR__ . '/TestFixtures/MyFixture1.php');
     $this->assertCount(4, $loader->getFixtures());
     $loader->loadFromFile(__DIR__ . '/TestFixtures/NotAFixture.php');
     $this->assertCount(4, $loader->getFixtures());
     $loader->loadFromFile(__DIR__ . '/TestFixtures/MyFixture2.php');
     $this->assertCount(5, $loader->getFixtures());
     $this->assertTrue($loader->isTransient('TestFixtures\\NotAFixture'));
     $this->assertFalse($loader->isTransient('TestFixtures\\MyFixture1'));
 }
开发者ID:Dren-x,项目名称:mobit,代码行数:16,代码来源:LoaderTest.php

示例4: testLoadFromFile

 public function testLoadFromFile()
 {
     $loader = new Loader();
     $loader->addFixture($this->getMockBuilder(FixtureInterface::class)->setMockClassName('Mock1')->getMock());
     $loader->addFixture($this->getMockBuilder(FixtureInterface::class)->setMockClassName('Mock2')->getMock());
     $loader->addFixture($this->getMockBuilder(SharedFixtureInterface::class)->setMockClassName('Mock3')->getMock());
     $this->assertCount(3, $loader->getFixtures());
     $loader->loadFromFile(__DIR__ . '/TestFixtures/MyFixture1.php');
     $this->assertCount(4, $loader->getFixtures());
     $loader->loadFromFile(__DIR__ . '/TestFixtures/NotAFixture.php');
     $this->assertCount(4, $loader->getFixtures());
     $loader->loadFromFile(__DIR__ . '/TestFixtures/MyFixture2.php');
     $this->assertCount(5, $loader->getFixtures());
     $this->assertTrue($loader->isTransient('TestFixtures\\NotAFixture'));
     $this->assertFalse($loader->isTransient('TestFixtures\\MyFixture1'));
 }
开发者ID:doctrine,项目名称:data-fixtures,代码行数:16,代码来源:LoaderTest.php


注:本文中的Doctrine\Common\DataFixtures\Loader::isTransient方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。