Skip to content

Commit

Permalink
✅ BASE #198 new tests
Browse files Browse the repository at this point in the history
  • Loading branch information
bjverde committed Oct 27, 2019
1 parent e6d72ce commit 7fc4db2
Showing 1 changed file with 22 additions and 0 deletions.
22 changes: 22 additions & 0 deletions base/test/classes/helpers/ArrayHelperTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -238,6 +238,28 @@ public function testValidateIdIsNumeric_OKArrayNotEmpty(){
$listArray[]=2;
$this->assertNull( ArrayHelper::validateIsArray($listArray,__METHOD__,__LINE__) );
}
//-----------------------------------------------------------------------------------
//-----------------------------------------------------------------------------------
//-----------------------------------------------------------------------------------
/**
* @expectedException InvalidArgumentException
*/
public function testFormDinDeleteRowByKeyIndex_FailNull(){
ArrayHelper::formDinDeleteRowByKeyIndex(null,10);
}

public function testFormDinDeleteRowByKeyIndex_FailAttributeNotExist(){
$mock = new mockFormDinArray();
$array = $mock->generateTable();

$result = ArrayHelper::formDinDeleteRowByKeyIndex($array,10);

$expected = false;
$this->assertEquals($expected, $result['result']);
$expected = TMessage::ARRAY_KEY_NOT_EXIST;
$this->assertEquals($expected, $result['message']);
}

//-----------------------------------------------------------------------------------
//-----------------------------------------------------------------------------------
//-----------------------------------------------------------------------------------
Expand Down

0 comments on commit 7fc4db2

Please sign in to comment.