本文整理汇总了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);
}
}
示例2: setUp
protected function setUp()
{
parent::setUp();
$evm = new EventManager();
$evm->addEventSubscriber(new SluggableListener());
$this->getMockSqliteEntityManager($evm);
}
示例3: setUp
protected function setUp()
{
parent::setUp();
$evm = new EventManager();
$this->encoderListener = new EncoderListener();
$evm->addEventSubscriber($this->encoderListener);
$this->getMockSqliteEntityManager($evm);
}
示例4: setUp
public function setUp()
{
parent::setUp();
$this->timestampable = new TimestampableListener();
$evm = new EventManager();
$evm->addEventSubscriber($this->timestampable);
$this->getMockSqliteEntityManager($evm);
}
示例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);
}
示例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);
}
示例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);
}
示例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');
}
示例9: setUp
protected function setUp()
{
parent::setUp();
$evm = new EventManager;
$this->HistoryableListener = new HistoryableListener();
$evm->addEventSubscriber($this->HistoryableListener);
$this->em = $this->getMockSqliteEntityManager($evm);
}
示例10: setUp
protected function setUp()
{
parent::setUp();
$evm = new EventManager();
$ipTraceableListener = new IpTraceableListener();
$ipTraceableListener->setIpValue(self::TEST_IP);
$evm->addEventSubscriber($ipTraceableListener);
$this->getMockSqliteEntityManager($evm);
}
示例11: setUp
protected function setUp()
{
parent::setUp();
$this->listener = new TreeListener();
$evm = new EventManager();
$evm->addEventSubscriber($this->listener);
$this->getMockSqliteEntityManager($evm);
$this->populate();
}
示例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);
}
示例13: setUp
protected function setUp()
{
parent::setUp();
$evm = new EventManager();
$blameableListener = new BlameableListener();
$blameableListener->setUserValue('testuser');
$evm->addEventSubscriber($blameableListener);
$this->getMockSqliteEntityManager($evm);
}
示例14: setUp
protected function setUp()
{
parent::setUp();
$evm = new EventManager();
$evm->addEventSubscriber(new SortableListener());
$this->getMockSqliteEntityManager($evm);
//$this->startQueryLog();
$this->populate();
}
示例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);
}