Example #1
0
 public function testGetLocalesFor()
 {
     $this->assertEquals(array(), $this->extension->getLocalesFor(null));
     $document = new \stdClass();
     $this->manager->expects($this->any())->method('find')->with(null, '/foo')->will($this->onConsecutiveCalls(null, $document));
     $this->assertEquals(array(), $this->extension->getLocalesFor('/foo'));
     $this->manager->expects($this->once())->method('getLocalesFor')->with($document)->will($this->returnValue(array('en', 'de')));
     $this->assertEquals(array('en', 'de'), $this->extension->getLocalesFor('/foo'));
 }