public function testTracksInMultimediaObject() { $mm = new MultimediaObject(); $track1 = new Track(); $track2 = new Track(); $track3 = new Track(); $this->assertEquals(0, count($mm->getTracks())); $mm->addTrack($track1); $mm->addTrack($track2); $mm->addTrack($track3); $this->assertEquals(3, count($mm->getTracks())); $tracksArray = array($track1, $track2, $track3); $this->assertEquals($tracksArray, $mm->getTracks()->toArray()); $mm->removeTrack($track2); $this->assertEquals(2, count($mm->getTracks())); $this->assertTrue($mm->containsTrack($track1)); $this->assertFalse($mm->containsTrack($track2)); $tracksArray = array(0 => $track1, 2 => $track3); $this->assertEquals($tracksArray, $mm->getTracks()->toArray()); }