PhpBench\Tests\Unit\Report\Generator\TableGeneratorTest::testColumns PHP Метод

testColumns() публичный Метод

It should provide the specfied columns in the specified order.
public testColumns ( )
    public function testColumns()
    {
        $collection = TestUtil::createCollection([[]]);
        $report = $this->generate($collection, ['cols' => ['mean', 'mode', 'benchmark', 'subject']]);
        $this->assertXPathCount($report, 4, '//cell');
        $this->assertXPathCount($report, 0, '//cell[@name="mean"]/preceding-sibling::cell');
        $this->assertXPathCount($report, 1, '//cell[@name="mode"]/preceding-sibling::cell');
        $this->assertXPathCount($report, 2, '//cell[@name="benchmark"]/preceding-sibling::cell');
        $this->assertXPathCount($report, 3, '//cell[@name="subject"]/preceding-sibling::cell');
    }