Esempio n. 1
0
 public function testCurrentLoops()
 {
     $loops = new Loops(new ArrayObject());
     $this->assertEquals($loops, Loops::getCurrentLoops());
     //new object, new current loopscontext
     $loops = new Loops(new ArrayObject());
     $this->assertEquals($loops, Loops::getCurrentLoops());
 }
Esempio n. 2
0
 public function testConstructDefaults()
 {
     $app = new WebApplication(__DIR__ . "/app", "/testpage");
     $loops = $app->getLoops();
     $page = new Testpage();
     $this->assertSame(Loops::getCurrentLoops(), $page->getLoops());
     $this->assertSame([], $page->parameter);
 }