public function testDifferentWorkspaces() { $this->markTestSkipped('Workspaces are not yet supported.'); $this->getObjects()->clear('JarvesPublicationBundle:News'); WorkspaceManager::setCurrent(0); $this->getObjects()->add('JarvesPublicationBundle:News', array('title' => 'News 1 in workspace live', 'lang' => 'en')); $this->getObjects()->add('JarvesPublicationBundle:News', array('title' => 'News 2 in workspace live', 'lang' => 'en')); WorkspaceManager::setCurrent(1); $this->getObjects()->add('JarvesPublicationBundle:News', array('title' => 'News 1 in workspace one', 'lang' => 'en')); $this->getObjects()->add('JarvesPublicationBundle:News', array('title' => 'News 2 in workspace one', 'lang' => 'en')); $this->getObjects()->add('JarvesPublicationBundle:News', array('title' => 'News 3 in workspace one', 'lang' => 'en')); //anything inserted and selecting works correctly? WorkspaceManager::setCurrent(0); $count = $this->getObjects()->getCount('JarvesPublicationBundle:News'); $this->assertEquals(2, $count); WorkspaceManager::setCurrent(1); $count = $this->getObjects()->getCount('JarvesPublicationBundle:News'); $this->assertEquals(3, $count); //anything inserted and selecting works correctly, also through propel directly? WorkspaceManager::setCurrent(0); $count = NewsQuery::create()->count(); $this->assertEquals(2, $count); WorkspaceManager::setCurrent(1); $count = NewsQuery::create()->count(); $this->assertEquals(3, $count); }
public function testThroughPropel() { WorkspaceManager::setCurrent(0); ItemQuery::create()->deleteAll(); ItemCategoryQuery::create()->deleteAll(); WorkspaceManager::setCurrent(0); //todo }