8935
This commit is contained in:
parent
4a5aea92fb
commit
8f67989319
10
.env.example
10
.env.example
|
|
@ -1,6 +1,6 @@
|
||||||
APP_NAME=iCLOP
|
APP_NAME=iCLOP
|
||||||
APP_ENV=local
|
APP_ENV=local
|
||||||
APP_KEY=
|
APP_KEY=base64:7PMb8dvpBWcRs5AMi3nEDHitF2MvqgC9QbOvCE5dvDo=
|
||||||
APP_DEBUG=true
|
APP_DEBUG=true
|
||||||
APP_URL=http://localhost
|
APP_URL=http://localhost
|
||||||
|
|
||||||
|
|
@ -11,10 +11,16 @@ LOG_LEVEL=debug
|
||||||
DB_CONNECTION=mysql
|
DB_CONNECTION=mysql
|
||||||
DB_HOST=127.0.0.1
|
DB_HOST=127.0.0.1
|
||||||
DB_PORT=3306
|
DB_PORT=3306
|
||||||
DB_DATABASE=laravel
|
DB_DATABASE=iclop
|
||||||
DB_USERNAME=root
|
DB_USERNAME=root
|
||||||
DB_PASSWORD=
|
DB_PASSWORD=
|
||||||
|
|
||||||
|
DB_HOST_SECOND=127.0.0.1
|
||||||
|
DB_PORT_SECOND=3306
|
||||||
|
DB_DATABASE_SECOND=test_db
|
||||||
|
DB_USERNAME_SECOND=root
|
||||||
|
DB_PASSWORD_SECOND=
|
||||||
|
|
||||||
NODEJS_DB_HOST=127.0.0.1
|
NODEJS_DB_HOST=127.0.0.1
|
||||||
NODEJS_DB_PORT=3306
|
NODEJS_DB_PORT=3306
|
||||||
NODEJS_DB_DATABASE=iclop_nodejs
|
NODEJS_DB_DATABASE=iclop_nodejs
|
||||||
|
|
|
||||||
|
|
@ -284,7 +284,7 @@ function unittesting(){
|
||||||
$pa = "vendor\bin\phpunit -c $path_test --filter HomepageLayoutTest::$unitesting_run";
|
$pa = "vendor\bin\phpunit -c $path_test --filter HomepageLayoutTest::$unitesting_run";
|
||||||
$path = base_path($pa);
|
$path = base_path($pa);
|
||||||
$output = shell_exec($path);
|
$output = shell_exec($path);
|
||||||
//echo "<pre>$pa</pre>";
|
echo "<pre>$pa</pre>";
|
||||||
|
|
||||||
$sql = DB::select("SELECT * FROM php_testing_rule WHERE testing_name = '$testing_number_one'");
|
$sql = DB::select("SELECT * FROM php_testing_rule WHERE testing_name = '$testing_number_one'");
|
||||||
$row = $sql[0];
|
$row = $sql[0];
|
||||||
|
|
|
||||||
|
|
@ -105,20 +105,34 @@ public function testLatihanNumberThree():void{
|
||||||
public function testLatihanNumberFour():void{
|
public function testLatihanNumberFour():void{
|
||||||
|
|
||||||
|
|
||||||
$response = $this->get("/phpunit/result-test-student/");
|
$response = $this->get("/phpunit/result-test-student/");
|
||||||
|
|
||||||
$sql = DB::select("SELECT * FROM php_testing_rule WHERE testing_name = 'testing_number_four'");
|
$sql = DB::select("SELECT * FROM php_testing_rule WHERE testing_name = 'testing_number_four'");
|
||||||
$row = $sql[0];
|
$row = $sql[0];
|
||||||
$html = $row->testing_rule;
|
$html = $row->testing_rule;
|
||||||
|
$hasil_output = $row->output;
|
||||||
$test = str_replace(array("\r\n","\r","\n"," "),"",$html);
|
|
||||||
$result_test = htmlspecialchars($test);
|
$test = str_replace(array("\r\n","\r","\n"," "),"",$html);
|
||||||
|
$result_test = htmlspecialchars($test);
|
||||||
$result_content = str_replace(array("\r\n","\r"," "),"", $response->content());
|
|
||||||
$this->assertStringContainsString($result_test, $result_content);
|
$result_content = str_replace(array("\r\n","\r"," "),"", $response->content());
|
||||||
|
if($result_test == $result_content){
|
||||||
|
$this->assertStringContainsString($result_test, $result_content);
|
||||||
|
}else{
|
||||||
|
$response = $this->get("/phpunit/result-test-student-output/");
|
||||||
|
$nilai = 75;
|
||||||
|
|
||||||
|
if ($nilai >= 70) {
|
||||||
|
echo "Nilai Anda: " . $nilai ;
|
||||||
|
echo "Anda lulus!";
|
||||||
|
}
|
||||||
|
$response->assertSeeText($nilai);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public function testLatihanNumberFive():void{
|
public function testLatihanNumberFive():void{
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user