for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
namespace TraderInteractive\ColumnParser\HeaderParser;
use PHPUnit\Framework\TestCase;
/**
* @coversDefaultClass \TraderInteractive\ColumnParser\HeaderParser\MultispacedParser
*/
class MultispacedParserTest extends TestCase
{
private $parser;
public function setUp()
$this->parser = new MultispacedParser();
}
* This tests the basic getMap behavior.
*
* @test
* @covers ::getMap
public function getMapFromSampleLine()
$this->assertSame(
['Name' => 6, 'Age' => 5, 'City of Birth' => 13],
$this->parser->getMap('Name Age City of Birth')
);
* This tests the getMap behavior for an empty row.
public function getMapFromEmptyLine()
$this->assertSame([], $this->parser->getMap(''));