<?php

namespace webignition\Tests\RobotsTxt\File;

use webignition\RobotsTxt\Record\Record;

class AddRecordTest extends FileTest {

    public function testAddRecord() {
        $record = new Record();
        $record->directiveList()->add('allow:/allowed-path');
        
        $this->file->addRecord($record);

        $this->assertEquals(1, count($this->file->getRecords()));
        $this->assertTrue($this->file->getRecords()[0] instanceof Record);
    }
}
<?php

namespace webignition\Tests\RobotsTxt\File;

use webignition\RobotsTxt\Record\Record;

class AddRecordTest extends FileTest {

    public function testAddRecord() {
        $record = new Record();
        $record->directiveList()->add('allow:/allowed-path');
        
        $this->file->addRecord($record);

        $fileRecords = $this->file->getRecords();

        $this->assertEquals(1, count($fileRecords));
        $this->assertTrue($fileRecords[0] instanceof Record);
    }
}
Fix PHP 5.3 compat in tests
Fix PHP 5.3 compat in tests
