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


PHP BaseTestCaseORM::setUp方法代码示例

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


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

示例1: setUp

 protected function setUp()
 {
     parent::setUp();
     $evm = new EventManager();
     $this->listener = new UploadableListenerStub();
     $this->listener->setMimeTypeGuesser(new MimeTypeGuesserStub('text/plain'));
     $evm->addEventSubscriber($this->listener);
     $config = $this->getMockAnnotatedConfig();
     $this->em = $this->getMockSqliteEntityManager($evm, $config);
     $this->testFile = __DIR__ . '/../../data/test.txt';
     $this->testFile2 = __DIR__ . '/../../data/test2.txt';
     $this->testFile3 = __DIR__ . '/../../data/test_3.txt';
     $this->testFileWithoutExt = __DIR__ . '/../../data/test4';
     $this->testFileWithSpaces = __DIR__ . '/../../data/test with spaces.txt';
     $this->destinationTestDir = __DIR__ . '/../../temp/uploadable';
     $this->destinationTestFile = $this->destinationTestDir . '/test.txt';
     $this->destinationTestFile2 = $this->destinationTestDir . '/test2.txt';
     $this->destinationTestFile3 = $this->destinationTestDir . '/test_3.txt';
     $this->destinationTestFileWithoutExt = $this->destinationTestDir . '/test4';
     $this->destinationTestFileWithSpaces = $this->destinationTestDir . '/test with spaces';
     $this->testFilename = substr($this->testFile, strrpos($this->testFile, '/') + 1);
     $this->testFilename2 = substr($this->testFile2, strrpos($this->testFile2, '/') + 1);
     $this->testFilename3 = substr($this->testFile3, strrpos($this->testFile3, '/') + 1);
     $this->testFilenameWithoutExt = substr($this->testFileWithoutExt, strrpos($this->testFileWithoutExt, '/') + 1);
     $this->testFilenameWithSpaces = substr($this->testFileWithSpaces, strrpos($this->testFileWithSpaces, '/') + 1);
     $this->testFileSize = 4;
     $this->testFileMimeType = 'text/plain';
     $this->clearFilesAndDirectories();
     if (!is_dir($this->destinationTestDir)) {
         mkdir($this->destinationTestDir);
     }
 }
开发者ID:erichard,项目名称:DoctrineExtensions,代码行数:32,代码来源:UploadableEntityTest.php

示例2: setUp

 protected function setUp()
 {
     parent::setUp();
     $evm = new EventManager();
     $evm->addEventSubscriber(new SluggableListener());
     $this->getMockSqliteEntityManager($evm);
 }
开发者ID:esserj,项目名称:DoctrineExtensions,代码行数:7,代码来源:Issue633Test.php

示例3: setUp

 protected function setUp()
 {
     parent::setUp();
     $evm = new EventManager();
     $this->encoderListener = new EncoderListener();
     $evm->addEventSubscriber($this->encoderListener);
     $this->getMockSqliteEntityManager($evm);
 }
开发者ID:robertowest,项目名称:CuteFlow-V4,代码行数:8,代码来源:ExtensionORMTest.php

示例4: setUp

 public function setUp()
 {
     parent::setUp();
     $this->timestampable = new TimestampableListener();
     $evm = new EventManager();
     $evm->addEventSubscriber($this->timestampable);
     $this->getMockSqliteEntityManager($evm);
 }
开发者ID:erichard,项目名称:DoctrineExtensions,代码行数:8,代码来源:TimestampableMappingTest.php

示例5: setUp

 protected function setUp()
 {
     parent::setUp();
     require_once __DIR__ . '/Mock/Extension/Encoder/Mapping/Annotations.php';
     $evm = new EventManager();
     $this->encoderListener = new EncoderListener();
     $evm->addEventSubscriber($this->encoderListener);
     $this->getMockSqliteEntityManager($evm);
 }
开发者ID:ilosada,项目名称:chamilo-lms-icpna,代码行数:9,代码来源:ExtensionORMTest.php

示例6: setUp

 protected function setUp()
 {
     parent::setUp();
     $this->listener = new TimestampableListenerStub();
     $this->listener->eventAdapter = new EventAdapterORMStub();
     $evm = new EventManager();
     $evm->addEventSubscriber($this->listener);
     $this->getMockSqliteEntityManager($evm);
 }
开发者ID:erichard,项目名称:DoctrineExtensions,代码行数:9,代码来源:ChangeTest.php

示例7: setUp

 protected function setUp()
 {
     parent::setUp();
     $evm = new EventManager();
     $this->translatableListener = new TranslationListener();
     $this->translatableListener->setTranslatableLocale('en_us');
     $evm->addEventSubscriber($this->translatableListener);
     $this->getMockSqliteEntityManager($evm);
 }
开发者ID:rdohms,项目名称:DoctrineExtensions,代码行数:9,代码来源:EntityTranslationTableTest.php

示例8: setUp

 protected function setUp()
 {
     parent::setUp();
     $evm = new EventManager();
     $evm->addEventSubscriber($this->softDeleteableListener = new SoftDeleteableListener());
     $this->getMockSqliteEntityManager($evm);
     $this->em->getConfiguration()->addFilter('softdelete', 'Gedmo\\SoftDeleteable\\Filter\\SoftDeleteableFilter');
     $this->em->getFilters()->enable('softdelete');
 }
开发者ID:ilosada,项目名称:chamilo-lms-icpna,代码行数:9,代码来源:HardRelationTest.php

示例9: setUp

    protected function setUp()
    {
        parent::setUp();

        $evm = new EventManager;
        $this->HistoryableListener = new HistoryableListener();
        $evm->addEventSubscriber($this->HistoryableListener);
        $this->em = $this->getMockSqliteEntityManager($evm);
    }
开发者ID:nacmartin,项目名称:Historyable,代码行数:9,代码来源:HistoryableEntityTest.php

示例10: setUp

 protected function setUp()
 {
     parent::setUp();
     $evm = new EventManager();
     $ipTraceableListener = new IpTraceableListener();
     $ipTraceableListener->setIpValue(self::TEST_IP);
     $evm->addEventSubscriber($ipTraceableListener);
     $this->getMockSqliteEntityManager($evm);
 }
开发者ID:esserj,项目名称:DoctrineExtensions,代码行数:9,代码来源:NoInterfaceTest.php

示例11: setUp

 protected function setUp()
 {
     parent::setUp();
     $this->listener = new TreeListener();
     $evm = new EventManager();
     $evm->addEventSubscriber($this->listener);
     $this->getMockSqliteEntityManager($evm);
     $this->populate();
 }
开发者ID:esserj,项目名称:DoctrineExtensions,代码行数:9,代码来源:ClosureTreeTest.php

示例12: setUp

 protected function setUp()
 {
     parent::setUp();
     $evm = new EventManager();
     $this->LoggableListener = new LoggableListener();
     $this->LoggableListener->setUsername('jules');
     $evm->addEventSubscriber($this->LoggableListener);
     $this->em = $this->getMockSqliteEntityManager($evm);
 }
开发者ID:esserj,项目名称:DoctrineExtensions,代码行数:9,代码来源:LoggableEntityTest.php

示例13: setUp

 protected function setUp()
 {
     parent::setUp();
     $evm = new EventManager();
     $blameableListener = new BlameableListener();
     $blameableListener->setUserValue('testuser');
     $evm->addEventSubscriber($blameableListener);
     $this->getMockSqliteEntityManager($evm);
 }
开发者ID:erichard,项目名称:DoctrineExtensions,代码行数:9,代码来源:NoInterfaceTest.php

示例14: setUp

 protected function setUp()
 {
     parent::setUp();
     $evm = new EventManager();
     $evm->addEventSubscriber(new SortableListener());
     $this->getMockSqliteEntityManager($evm);
     //$this->startQueryLog();
     $this->populate();
 }
开发者ID:recipe,项目名称:DoctrineExtensions,代码行数:9,代码来源:SortableTest.php

示例15: setUp

 protected function setUp()
 {
     parent::setUp();
     $this->listener = new TreeListener();
     $evm = new EventManager();
     $evm->addEventSubscriber($this->listener);
     $this->getMockSqliteEntityManager($evm);
     $meta = $this->em->getClassMetadata(self::CATEGORY);
     $this->config = $this->listener->getConfiguration($this->em, $meta->name);
 }
开发者ID:esserj,项目名称:DoctrineExtensions,代码行数:10,代码来源:MaterializedPathORMFeaturesTest.php


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