testBaseUrlHasBeenSet
15 $this->assertTrue(defined('APPPATH'));
16 }
17
18 public function testBaseUrlHasBeenSet()19 {
20 $validation = Services::validation();
21
testIsDefinedAppPath
10 */
11final class HealthTest extends CIUnitTestCase
12{
13 public function testIsDefinedAppPath()14 {
15 $this->assertTrue(defined('APPPATH'));
16 }
testSessionSimple
8 */
9final class ExampleSessionTest extends CIUnitTestCase
10{
11 public function testSessionSimple()12 {
13 $session = Services::session();
14
testModelFindAll
14
15 protected $seed = ExampleSeeder::class;
16
17 public function testModelFindAll()18 {
19 $model = new ExampleModel();
20
testSoftDeleteLeavesRow
25 $this->assertCount(3, $objects);
26 }
27
28 public function testSoftDeleteLeavesRow()29 {
30 $model = new ExampleModel();
31 $this->setPrivateProperty($model, 'useSoftDeletes', true);
Documentation comments are helpful in understanding what that part of the code is responsible for. It is always a good idea to add documentation to your code to improve the code readability and maintainability. In addition to that, it becomes helpful when you revisit the code after a long time. Here, the function/class method is missing the doc comment and it is recommended to add it for the reasons discussed above.