Example #1
0
 public function testGeneratedDojoBuildProfileWithLayerDependencies()
 {
     $this->view->dojo()->requireModule('dijit.layout.BorderContainer')->requireModule('dojox.layout.ContentPane');
     $build = new Zend_Dojo_BuildLayer(array('layerScriptPath' => '../zend/main.js', 'view' => $this->view, 'layerName' => 'zend.main'));
     $profile = $build->generateBuildProfile();
     $expected = file_get_contents(dirname(__FILE__) . '/_files/BuildProfileWithDependencies.js');
     $decodedProfile = $this->decodeProfileJson($profile);
     $decodedExpected = $this->decodeProfileJson($expected);
     foreach ($decodedExpected as $key => $value) {
         $this->assertArrayHasKey($key, $decodedProfile);
         $this->assertEquals($value, $decodedProfile[$key]);
     }
 }
Example #2
0
 public function testGeneratedDojoBuildProfileWithLayerDependencies()
 {
     $this->view->dojo()->requireModule('dijit.layout.BorderContainer')->requireModule('dojox.layout.ContentPane');
     $build = new Zend_Dojo_BuildLayer(array('view' => $this->view, 'layerName' => 'zend.main'));
     $profile = $build->generateBuildProfile();
     $expected = file_get_contents(dirname(__FILE__) . '/_files/BuildProfileWithDependencies.js');
     $decodedProfile = $this->decodeProfileJson($profile);
     $decodedExpected = $this->decodeProfileJson($expected);
     $this->assertEquals($decodedExpected, $decodedProfile, 'Expected: ' . $expected . "\nReceived: " . $profile . "\n");
 }