for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
/**
* This file is part of the Axstrad library.
*
* (c) Dan Kempster <[email protected]>
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
* @author Dan Kempster <[email protected]>
* @package Axstrad\Common
* @subpackage Tests
*/
namespace Axstrad\Common\Tests\Traits;
use Axstrad\Component\Test\TraitTestCase;
* Axstrad\Common\Tests\Traits\NameTraitTest
* covers Axstrad\Common\Traits\NameTrait::getName
* covers Axstrad\Common\Traits\NameTrait::setName
* @group unittest
* @uses Axstrad\Common\Traits\NameTrait
class NameTraitTest extends TraitTestCase
{
protected $trait = 'Axstrad\Common\Traits\NameTrait';
public function testNameTrait()
$this->assertNull(
$this->fixture->getName(),
'$name doesn\'t start as NULL'
);
$this->assertEquals(
$this->fixture,
$this->fixture->setName('Bar'),
'setName() didn\'t return self'
'Bar',
$this->fixture->getName()
$this->fixture->setName(null);
'',
'$name should be an empty string when null is passed'
}