for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
namespace N98\Magento\Command\Eav\Attribute;
use N98\Magento\Command\PHPUnit\TestCase;
class AbstractAttributeCommandTest extends TestCase
{
/**
* Ensure that the getAttribute() method returns a Magento EAV attribute model
*/
public function testShouldGetAnAttributeModel()
$mock = $this->getMockBuilder(AbstractAttributeCommand::class)
->disableOriginalConstructor()
->setMethods(array('getApplication'))
->getMockForAbstractClass();
$mock
->expects($this->once())
->method('getApplication')
->will($this->returnValue($this->getApplication()));
$result = $mock->getAttribute('catalog_product', 'status');
$this->assertInstanceOf('\Magento\Eav\Model\Entity\Attribute\AbstractAttribute', $result);
}