當前位置: 首頁>>代碼示例>>PHP>>正文


PHP Tool\BaseTestCaseORM類代碼示例

本文整理匯總了PHP中Tool\BaseTestCaseORM的典型用法代碼示例。如果您正苦於以下問題:PHP BaseTestCaseORM類的具體用法?PHP BaseTestCaseORM怎麽用?PHP BaseTestCaseORM使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。


在下文中一共展示了BaseTestCaseORM類的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類示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。