All shortcuts start with the pu
prefix and are both short and intuitive:
putest
<?php
namespace AlgoTech\MainBundle\Tests;
/**
* Class: CustomTest
*
* @see https://phpunit.de/manual/4.5/en/writing-tests-for-phpunit.html
* @see \PHPUnit_Framework_TestCase
*/
class CustomTest extends \PHPUnit_Framework_TestCase
{
}
pumock
$this
->getMockBuilder('Class')
->setMethods(array())
->disableOriginalConstructor()
->getMock()
pumockpartial
$this
->getMockBuilder('Class')
->setConstructorArgs(array())
->setMethods(array())
->getMock()
puexpects
->expects($this->once())
->method('method')
->with($this->equalTo('something'))
->will($this->returnValue(null))
puexpectsat
->expects($this->at(0))
->method('method')
->with($this->equalTo('something'))
->will($this->returnValue(null))