Skip to content
Snippets Groups Projects
Commit 2d13cc85 authored by Vinciane's avatar Vinciane
Browse files

TU Correction delete resource

parent 4c6caedb
No related branches found
No related tags found
No related merge requests found
...@@ -72,11 +72,13 @@ class HistoryControllerTest extends TestCase ...@@ -72,11 +72,13 @@ class HistoryControllerTest extends TestCase
public function testRealDelete(){ public function testRealDelete(){
//get notes //get last notes
$getResId = DatabaseModel::select([ $getResId = DatabaseModel::select([
'select' => ['res_id'], 'select' => ['res_id'],
'table' => ['res_letterbox'], 'table' => ['res_letterbox'],
'limit' => 1, 'where' => ['subject = ?','status = ?'],
'data' => ['Breaking News : Superman is alive - PHP unit', 'DEL'],
'order_by' => ['res_id DESC']
]); ]);
$resID['resId'] = $getResId[0]['res_id']; $resID['resId'] = $getResId[0]['res_id'];
......
...@@ -16,11 +16,13 @@ class NoteControllerTest extends TestCase ...@@ -16,11 +16,13 @@ class NoteControllerTest extends TestCase
public function testCreate() public function testCreate()
{ {
//get notes //get last notes
$getResId = DatabaseModel::select([ $getResId = DatabaseModel::select([
'select' => ['res_id'], 'select' => ['res_id'],
'table' => ['res_letterbox'], 'table' => ['res_letterbox'],
'limit' => 1, 'where' => ['subject = ?','status = ?'],
'data' => ['Breaking News : Superman is alive - PHP unit', 'DEL'],
'order_by' => ['res_id DESC']
]); ]);
$resID['resId'] = $getResId[0]['res_id']; $resID['resId'] = $getResId[0]['res_id'];
......
...@@ -27,7 +27,7 @@ class ResControllerTest extends TestCase ...@@ -27,7 +27,7 @@ class ResControllerTest extends TestCase
$data = [ $data = [
[ [
'column' => 'subject', 'column' => 'subject',
'value' => 'Breaking News : Superman is alive', 'value' => 'Breaking News : Superman is alive - PHP unit',
'type' => 'string', 'type' => 'string',
], ],
[ [
...@@ -63,7 +63,7 @@ class ResControllerTest extends TestCase ...@@ -63,7 +63,7 @@ class ResControllerTest extends TestCase
$this->assertInternalType('array', $res); $this->assertInternalType('array', $res);
$this->assertSame('Breaking News : Superman is alive', $res['subject']); $this->assertSame('Breaking News : Superman is alive - PHP unit', $res['subject']);
$this->assertSame(null, $res['title']); $this->assertSame(null, $res['title']);
$this->assertSame(null, $res['description']); $this->assertSame(null, $res['description']);
$this->assertSame(102, $res['type_id']); $this->assertSame(102, $res['type_id']);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment