Measure_test =============== Part of CI PHPUnit Test * Class name: Measure_test * Namespace: * Parent class: [TestCase](TestCase.md) Properties ---------- ### $userId private mixed $userId * Visibility: **private** * This property is **static**. ### $watchId private mixed $watchId * Visibility: **private** * This property is **static**. ### $measureId private mixed $measureId * Visibility: **private** * This property is **static**. ### $watch private mixed $watch * Visibility: **private** * This property is **static**. ### $watchMeasure private mixed $watchMeasure * Visibility: **private** * This property is **static**. ### $enable_patcher public mixed $enable_patcher = false * Visibility: **public** * This property is **static**. ### $_error_reporting protected mixed $_error_reporting = -1 * Visibility: **protected** ### $request protected \CIPHPUnitTestRequest $request * Visibility: **protected** ### $double protected \CIPHPUnitTestDouble $double * Visibility: **protected** Methods ------- ### setUpBeforeClass mixed CIPHPUnitTestCase::setUpBeforeClass() * Visibility: **public** * This method is **static**. * This method is defined by [CIPHPUnitTestCase](CIPHPUnitTestCase.md) ### setUp mixed Measure_test::setUp() * Visibility: **public** ### test_addBaseMesure mixed Measure_test::test_addBaseMesure() * Visibility: **public** ### test_getMeasuresByUser mixed Measure_test::test_getMeasuresByUser() * Visibility: **public** ### test_addAccuracyMesure mixed Measure_test::test_addAccuracyMesure() * Visibility: **public** ### test_getMeasuresByUser2 mixed Measure_test::test_getMeasuresByUser2() * Visibility: **public** ### test_addBaseMesure1 mixed Measure_test::test_addBaseMesure1() * Visibility: **public** ### test_addAccuracyMesure1 mixed Measure_test::test_addAccuracyMesure1() * Visibility: **public** ### test_getMeasuresByUser4 mixed Measure_test::test_getMeasuresByUser4() * Visibility: **public** ### test_addBaseMesure2 mixed Measure_test::test_addBaseMesure2() * Visibility: **public** ### test_addAccuracyMesure2 mixed Measure_test::test_addAccuracyMesure2() * Visibility: **public** ### test_getMeasuresByUser6 mixed Measure_test::test_getMeasuresByUser6() * Visibility: **public** ### test_measureArchive mixed Measure_test::test_measureArchive() * Visibility: **public** ### test_deleteMeasure mixed Measure_test::test_deleteMeasure() * Visibility: **public** ### test_getMeasuresCountByWatchBrand mixed Measure_test::test_getMeasuresCountByWatchBrand() * Visibility: **public** ### test_computePercentileAccuracy mixed Measure_test::test_computePercentileAccuracy() * Visibility: **public** ### __construct 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](CIPHPUnitTestCase.md) #### Arguments * $name **string** * $data **array** * $dataName **string** ### request mixed CIPHPUnitTestCase::request(string $http_method, array|string $argv, array $params, callable $callable) Request to Controller * Visibility: **public** * This method is defined by [CIPHPUnitTestCase](CIPHPUnitTestCase.md) #### Arguments * $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> ### ajaxRequest 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](CIPHPUnitTestCase.md) #### Arguments * $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> ### getDouble 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](CIPHPUnitTestCase.md) #### Arguments * $classname **string** * $params **array** - <p>[method_name => return_value]</p> ### verifyInvokedMultipleTimes 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](CIPHPUnitTestCase.md) #### Arguments * $mock **object** - <p>PHPUnit mock object</p> * $method **string** * $times **integer** * $params **array** - <p>arguments</p> ### verifyInvoked 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](CIPHPUnitTestCase.md) #### Arguments * $mock **object** - <p>PHPUnit mock object</p> * $method **string** * $params **array** - <p>arguments</p> ### verifyInvokedOnce mixed CIPHPUnitTestCase::verifyInvokedOnce(object $mock, string $method, array $params) Verifies that method was invoked only once * Visibility: **public** * This method is defined by [CIPHPUnitTestCase](CIPHPUnitTestCase.md) #### Arguments * $mock **object** - <p>PHPUnit mock object</p> * $method **string** * $params **array** - <p>arguments</p> ### verifyNeverInvoked mixed CIPHPUnitTestCase::verifyNeverInvoked(object $mock, string $method, array $params) Verifies that method was not called * Visibility: **public** * This method is defined by [CIPHPUnitTestCase](CIPHPUnitTestCase.md) #### Arguments * $mock **object** - <p>PHPUnit mock object</p> * $method **string** * $params **array** - <p>arguments</p> ### warningOff mixed CIPHPUnitTestCase::warningOff() * Visibility: **public** * This method is defined by [CIPHPUnitTestCase](CIPHPUnitTestCase.md) ### warningOn mixed CIPHPUnitTestCase::warningOn() * Visibility: **public** * This method is defined by [CIPHPUnitTestCase](CIPHPUnitTestCase.md) ### assertResponseCode mixed CIPHPUnitTestCase::assertResponseCode(integer $code) Asserts HTTP response code * Visibility: **public** * This method is defined by [CIPHPUnitTestCase](CIPHPUnitTestCase.md) #### Arguments * $code **integer** ### assertRedirect mixed CIPHPUnitTestCase::assertRedirect(string $uri, integer $code) Set Expected Redirect This method needs . * Visibility: **public** * This method is defined by [CIPHPUnitTestCase](CIPHPUnitTestCase.md) #### Arguments * $uri **string** - <p>URI to redirect</p> * $code **integer** - <p>Response Code</p>