for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
use Robo\ResultData;
/**
* Class ResultDataTest.
*
* @coversDefaultClass \Robo\ResultData
*/
class ResultDataTest extends \Codeception\Test\Unit
You can fix this by adding a namespace to your class:
namespace YourVendor; class YourClass { }
When choosing a vendor namespace, try to pick something that is not too generic to avoid conflicts with other libraries.
{
* @var \CodeGuy
protected $guy;
public function testResultDataUpdate()
$a = new ResultData(ResultData::EXITCODE_OK, '', ['one' => 'first', 'two' => 'second']);
$b = new ResultData(ResultData::EXITCODE_OK, '', ['one' => 'First', 'three' => 'Third']);
$expected = ['one' => 'first', 'two' => 'second'];
$this->guy->assertEquals($expected, $a->getData());
$a->update($b);
$expected = ['one' => 'First', 'two' => 'second', 'three' => 'Third'];
}
public function testResultDataMergeData()
$to_be_merged = [
['one' => 'ignored',],
['three' => 'new',],
];
foreach ($to_be_merged as $mergeThis) {
$a->mergeData($mergeThis);
$expected = ['one' => 'first', 'two' => 'second', 'three' => 'new'];
You can fix this by adding a namespace to your class:
When choosing a vendor namespace, try to pick something that is not too generic to avoid conflicts with other libraries.