After installed xdebug, I got this :
Code:
./vendor/bin/phpunit --debug
Cannot load Xdebug - it was already loaded
PHPUnit 9.5.3 by Sebastian Bergmann and contributors.
Test 'App\Libraries\FooTest::testFooNotBar' started
Test 'App\Libraries\FooTest::testFooNotBar' ended
Test 'App\TestUrlExists::testURLS' started
Test 'App\TestUrlExists::testURLS' ended
Test 'Warning' started
Test 'Warning' ended
Time: 00:00.238, Memory: 26.00 MB
There was 1 error:
1) App\TestUrlExists::testURLS
CodeIgniter\Exceptions\PageNotFoundException: Controller or its method is not found: \App\Controllers\Hypnotherapeute-toulouse::index
/opt/lampp/htdocs/hypno/system/CodeIgniter.php:1003
/opt/lampp/htdocs/hypno/system/CodeIgniter.php:349
/opt/lampp/htdocs/hypno/system/Test/FeatureTestTrait.php:182
/opt/lampp/htdocs/hypno/tests/App/UrlExistsTest.php:76
--
There was 1 warning:
1) Warning
No tests found in class "CodeIgniter\Test\FeatureTestCase".
ERRORS!
Tests: 3, Assertions: 2, Errors: 1, Warnings: 1.
Generating code coverage report in Clover XML format ... done [00:00.074]
Generating code coverage report in HTML format ... done [00:00.112]
Generating code coverage report in PHP format ... done [00:00]
Code Coverage Report:
2021-03-18 03:49:20
Summary:
Classes: 33.33% (2/6)
Methods: 33.33% (3/9)
Lines: 34.69% (17/49)
App\Controllers\BaseController
Methods: 100.00% ( 1/ 1) Lines: 100.00% ( 2/ 2)
App\Controllers\Home
Methods: 33.33% ( 1/ 3) Lines: 40.00% ( 2/ 5)
Config\Database
Methods: 100.00% ( 1/ 1) Lines: 100.00% ( 4/ 4)
What is that in my result ?
Code:
Test 'Warning' started
Test 'Warning' ended
It seems like I made "Warning" test... Maybe a namespace problem ?
I think I've missed something...
This is the top of my Test Class file :
PHP Code:
<?php
namespace App;
use CodeIgniter\Test\FeatureTestCase;
class TestUrlExists extends FeatureTestCase
{
public function setUp(): void
{
parent::setUp();
}
public function tearDown(): void
{
parent::tearDown();
}
........