public function testGetDateModified() { $dir = new Directory(); $link = new DirectoryLink($dir); $this->assertInstanceOf('DateTime', $link->getDateModified()); $this->assertNotSame($link->getDateModified(), $dir->getDateModified()); }
public function testGetSize() { $dir = new Directory($this->nodes); $this->nodeA->shouldReceive('getSize')->once()->withNoArgs()->andReturn(1); $this->nodeB->shouldReceive('getSize')->once()->withNoArgs()->andReturn(2); $this->nodeC->shouldReceive('getSize')->once()->withNoArgs()->andReturn(3); $this->assertEquals(6, $dir->getSize()); }