--- /dev/null
+<?php
+
+class AlloObjectTest extends PHPUnit_Framework_TestCase {
+
+ public function testImportFromArray(){
+ $appliance = new MockAlloObject();
+ $appliance->importFromArray(array('id'=>12));
+ $this->assertEquals(12,$appliance->id);
+ }
+
+ public function testImportFromArrayNotInArray(){
+ $appliance = new MockAlloObject();
+ $appliance->importFromArray(array('toto'=>12));
+ $this->assertEquals(false,$appliance->id);
+ }
+
+}
+
+class MockAlloObject extends AlloObject {
+ public $id;
+}
\ No newline at end of file