-
Notifications
You must be signed in to change notification settings - Fork 0
Home_test
Part of CI PHPUnit Test
- Class name: Home_test
- Namespace:
- Parent class: TestCase
public mixed $enable_patcher = false
- Visibility: public
- This property is static.
protected mixed $_error_reporting = -1
- Visibility: protected
protected \CIPHPUnitTestRequest $request
- Visibility: protected
protected \CIPHPUnitTestDouble $double
- Visibility: protected
mixed Home_test::test_index()
- Visibility: public
mixed Home_test::test_result()
- Visibility: public
mixed Home_test::test_about()
- Visibility: public
mixed Home_test::test_contact()
- Visibility: public
mixed Home_test::test_signupEmail()
- Visibility: public
mixed Home_test::test_resetPassword()
- Visibility: public
mixed Home_test::test_logout()
- Visibility: public
mixed CIPHPUnitTestCase::__construct(string $name, array $data, string $dataName)
Constructs a test case with the given name.
- Visibility: public
- This method is defined by CIPHPUnitTestCase
- $name string
- $data array
- $dataName string
mixed CIPHPUnitTestCase::setUpBeforeClass()
- Visibility: public
- This method is static.
- This method is defined by CIPHPUnitTestCase
mixed CIPHPUnitTestCase::request(string $http_method, array|string $argv, array $params, callable $callable)
Request to Controller
- Visibility: public
- This method is defined by CIPHPUnitTestCase
- $http_method string - <p>HTTP method</p>
- $argv array|string - <p>array of controller,method,arg|uri</p>
- $params array - <p>POST parameters/Query string</p>
- $callable callable - <p>[deprecated] function to run after controller instantiation. Use $this->request->setCallable() method instead</p>
mixed CIPHPUnitTestCase::ajaxRequest(string $http_method, array|string $argv, array $params, callable $callable)
Request to Controller using ajax request
- Visibility: public
- This method is defined by CIPHPUnitTestCase
- $http_method string - <p>HTTP method</p>
- $argv array|string - <p>array of controller,method,arg|uri</p>
- $params array - <p>POST parameters/Query string</p>
- $callable callable - <p>[deprecated] function to run after controller instantiation. Use $this->request->setCallable() method instead</p>
object CIPHPUnitTestCase::getDouble(string $classname, array $params)
Get Mock Object
$email = $this->getMockBuilder('CI_Email') ->setMethods(['send']) ->getMock(); $email->method('send')->willReturn(TRUE);
will be
$email = $this->getDouble('CI_Email', ['send' => TRUE]);
- Visibility: public
- This method is defined by CIPHPUnitTestCase
- $classname string
- $params array - <p>[method_name => return_value]</p>
mixed CIPHPUnitTestCase::verifyInvokedMultipleTimes(object $mock, string $method, integer $times, array $params)
Verifies that method was called exactly $times times
$loader->expects($this->exactly(2)) ->method('view') ->withConsecutive( ['shop_confirm', $this->anything(), TRUE], ['shop_tmpl_checkout', $this->anything()] );
will be
$this->verifyInvokedMultipleTimes( $loader, 'view', 2, [ ['shop_confirm', $this->anything(), TRUE], ['shop_tmpl_checkout', $this->anything()] ] );
- Visibility: public
- This method is defined by CIPHPUnitTestCase
- $mock object - <p>PHPUnit mock object</p>
- $method string
- $times integer
- $params array - <p>arguments</p>
mixed CIPHPUnitTestCase::verifyInvoked(object $mock, string $method, array $params)
Verifies a method was invoked at least once
- Visibility: public
- This method is defined by CIPHPUnitTestCase
- $mock object - <p>PHPUnit mock object</p>
- $method string
- $params array - <p>arguments</p>
mixed CIPHPUnitTestCase::verifyInvokedOnce(object $mock, string $method, array $params)
Verifies that method was invoked only once
- Visibility: public
- This method is defined by CIPHPUnitTestCase
- $mock object - <p>PHPUnit mock object</p>
- $method string
- $params array - <p>arguments</p>
mixed CIPHPUnitTestCase::verifyNeverInvoked(object $mock, string $method, array $params)
Verifies that method was not called
- Visibility: public
- This method is defined by CIPHPUnitTestCase
- $mock object - <p>PHPUnit mock object</p>
- $method string
- $params array - <p>arguments</p>
mixed CIPHPUnitTestCase::warningOff()
- Visibility: public
- This method is defined by CIPHPUnitTestCase
mixed CIPHPUnitTestCase::warningOn()
- Visibility: public
- This method is defined by CIPHPUnitTestCase
mixed CIPHPUnitTestCase::assertResponseCode(integer $code)
Asserts HTTP response code
- Visibility: public
- This method is defined by CIPHPUnitTestCase
- $code integer
mixed CIPHPUnitTestCase::assertRedirect(string $uri, integer $code)
Set Expected Redirect
This method needs https://github.com/kenjis/ci-phpunit-test/blob/master/application/helpers/MY_url_helper.php.
- Visibility: public
- This method is defined by CIPHPUnitTestCase
- $uri string - <p>URI to redirect</p>
- $code integer - <p>Response Code</p>