--- /dev/null
+<?php
+
+namespace App\Test\TestCase\View\Helper;
+
+/* use Cake\Network\Request;
+ use Cake\Network\Session;
+ use Cake\ORM\TableRegistry; */
+
+use App\View\Helper\ListsHelper;
+use Cake\Core\Configure;
+use Cake\Network\Request;
+use Cake\ORM\TableRegistry;
+use Cake\TestSuite\TestCase;
+use Cake\View\View;
+
+/**
+ *
+ */
+class ListsHelperTest extends TestCase
+{
+
+ public $softwaresList;
+ public $expextedHtmlStrucure;
+
+ /**
+ * setUp method
+ *
+ * @return void
+ */
+ public function setUp()
+ {
+ parent::setUp();
+
+ $this->View = new View();
+ $this->View->request = new Request([]);
+
+ $this->Lists = new ListsHelper($this->View);
+
+ $this->softwaresList = json_encode(
+ [
+ [
+ "id" => 71,
+ "software_id" => 15,
+ "user_id" => 39,
+ "relationship_id" => 7,
+ "created" => '2016-06-13T14:58:22+0000',
+ "modified" => '2016-06-13T14:58:22+0000',
+ "software" => [
+ "id" => 15,
+ "softwarename" => 'i-delibRE',
+ "logo_directory" => 'files/Softwares/15/photo/avatar',
+ "photo" => 'Softwares_Logo_idelibre.png',
+ "description" => 'Le projet i-delibRE est le porte-document nomade des élus pour le suivi des séances délibérantes de la collectivité.',
+ ],
+ ]
+ ],JSON_PRETTY_PRINT
+ );
+ }
+
+ /**
+ * tearDown method
+ *
+ * @return void
+ */
+ public function tearDown()
+ {
+ parent::tearDown();
+ unset($this->Lists, $this->View);
+ }
+
+ /**
+ * Tests the className method
+ *
+ * @covers App\View\Helper\ListsHelper::softwares
+ */
+ public function testSoftwares()
+ {
+ $body = json_decode($this->softwaresList);
+
+
+
+ // If the list of softwares is empty
+ $this->assertEquals(null, $this->Lists->softwares([]));
+
+ $softwareItem = [
+ ["ul" => ["class"=>"list-unstyled"]],
+ ["li" => true],
+ ["div" => [ "class" => "software-unit col-xs-12 col-sm-4 col-md-3 col-lg-3" ]],
+ ["h3" => true],
+ ['a' => ["href"]],'i-delibRE','/a','/h3'
+ ,
+ ['a'=>["href"],'img'=>["src"=>"http://localhost/comptoir-srv/files/Softwares/15/photo/avatar/Softwares_Logo_idelibre.png", "alt"=>"i-delibRE", "class"=>"img-responsive size-logo hidden-xs"]],
+ '/a',
+ "p" =>[ "class" => "text-overflow project-description"]
+ ];
+
+ $this->assertHtml($softwareItem,$this->Lists->softwares(json_decode( $this->softwaresList) ),true);
+ }
+}