Skip to content

Commit

Permalink
Update CreateAPITestCaseTest.php
Browse files Browse the repository at this point in the history
  • Loading branch information
usernane committed Sep 2, 2024
1 parent 5657526 commit 6f98668
Showing 1 changed file with 8 additions and 5 deletions.
13 changes: 8 additions & 5 deletions tests/webfiori/framework/test/cli/CreateAPITestCaseTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ public function testCreateAPITestCase01() {
]);
$exitCode = $runner->start();
$this->assertEquals(0, $exitCode);
$path = ROOT_PATH.DS."tests".DS."webfiori".DS."framework".DS."scheduler".DS."webServices";
$this->assertEquals([
"Info: Selected services manager has no service with name 'c'.\n",
"Which service you would like to have a test case for?\n",
Expand All @@ -60,9 +61,9 @@ public function testCreateAPITestCase01() {
"Test case will be created with following parameters:\n",
"PHPUnit Version: 9\n",
'Name: \\tests\webfiori\\framework\scheduler\webServices\\TasksLoginServiceTest'."\n",
"Path: ".ROOT_PATH."\\tests\webfiori\\framework\scheduler\webServices\n",
"Path: ".$path."\n",
"Would you like to use default parameters?(Y/n)\n",
"Info: New class was created at \"".ROOT_PATH.DS."tests".DS."webfiori".DS."framework".DS."scheduler".DS."webServices\".\n"
"Info: New class was created at \"".$path."\".\n"
], $runner->getOutput());
$clazz = '\tests\webfiori\\framework\scheduler\webServices\\TasksLoginServiceTest';
$this->assertTrue(class_exists($clazz));
Expand All @@ -85,8 +86,9 @@ public function testCreateAPITestCase02() {
]);
$exitCode = $runner->start();
$this->assertEquals(0, $exitCode);
$path = ROOT_PATH.DS."tests".DS."webfiori".DS."framework".DS."scheduler".DS."webServices";
$this->assertEquals([
"Info: New class was created at \"".ROOT_PATH.DS."\tests".DS."webfiori".DS."framework".DS."scheduler".DS."webServices".DS."\n"
"Info: New class was created at \"".$path."\".\n"
], $runner->getOutput());
$clazz = '\tests\webfiori\\framework\scheduler\webServices\\GetTasksServiceTest';
$this->assertTrue(class_exists($clazz));
Expand All @@ -113,17 +115,18 @@ public function testCreateAPITestCase03() {
]);
$exitCode = $runner->start();
$this->assertEquals(0, $exitCode);
$path = ROOT_PATH.DS."tests".DS."webfiori".DS."framework".DS."scheduler".DS."webServices";
$this->assertEquals([
"Please enter services manager information:\n",
"Test case will be created with following parameters:\n",
"PHPUnit Version: 9\n",
'Name: \\tests\webfiori\\framework\scheduler\webServices\\GetTasksServiceTest'."\n",
"Path: ".ROOT_PATH."\\tests\webfiori\\framework\scheduler\webServices\n",
"Path: ".$path."\n",
"Would you like to use default parameters?(Y/n)\n",
"PHPUnit Version: Enter = '11'\n",
"Enter a name for the new class:\n",
"Enter an optional namespace for the class: Enter = 'tests\webfiori\\framework\scheduler\webServices'\n",
"Info: New class was created at \"".ROOT_PATH.DS."tests".DS."webfiori".DS."framework".DS."scheduler".DS."webServices".DS.".\n"
"Info: New class was created at \"".$path."\".\n"
], $runner->getOutput());
$clazz = '\tests\webfiori\\framework\scheduler\webServices\\GetTasksServiceTest';
$this->assertTrue(class_exists($clazz));
Expand Down

0 comments on commit 6f98668

Please sign in to comment.