public function testInitData() { $e = new SearchTest(); $e->title = 'Once there was an ORM framework'; $e->content = 'There are many ORM frameworks, but nevertheless we decided to create one.'; $e->save(); $e = new SearchTest(); $e->title = 'Doctrine development continues'; $e->content = 'The development has been going well so far.'; $e->save(); }
public static function setUpBeforeClass() { parent::setUpBeforeClass(); // Removes cached authentication data if any self::$objectStorage->reloadAuthenticationData(); // Grab a container to search $container = self::$objectStorage->with('/')->get(); $containerCount = count($container->containers); if ($containerCount > 0) { $containerToSearch = $container->containers[$containerCount - rand(0, $containerCount - 1)]; self::$containerToSearch = $containerToSearch->getPath(); } self::$newContainerName = 'phpUnit_' . substr(md5(time()), 0, 7) . time(); foreach (range(0, 5) as $idx) { self::$newObjectNames[] = self::$newContainerName . '/' . $idx . '.txt'; } self::$metaKey = 'search-test'; self::$newObjectMeta = 'doremipasolrasido'; self::$newObjectBody = 'SoftLayer technologies. Object Stroage test file.'; }
public function testBatchUpdatesUpdateAllPendingEntries() { $e = new SearchTest(); $e->batchUpdateIndex(); $coll = Doctrine_Query::create() ->from('SearchTestIndex s') ->setHydrationMode(Doctrine::HYDRATE_ARRAY) ->execute(); $coll = $this->conn->fetchAll('SELECT * FROM search_test_index'); }
/** * SearchApiTest constructor. */ public function setUp() { parent::setUp(); $this->header = ['Host: api.twitter.com', 'Authorization: Bearer BEARER TOKEN', 'Content-Type: application/x-www-form-urlencoded;charset=UTF-8']; }