public function testAddClockFeature() { $label = new Label(); $this->assertEmpty($label->getScriptFeatures()); $this->assertSame($label, $label->addClockFeature(true, false)); $scriptFeatures = $label->getScriptFeatures(); $this->assertCount(1, $scriptFeatures); /** @var Clock $clock */ $clock = $scriptFeatures[0]; $this->assertTrue($clock instanceof Clock); $this->assertSame($label, $clock->getLabel()); $this->assertTrue($clock->getShowSeconds()); $this->assertFalse($clock->getShowFullDate()); }