Exemplo n.º 1
0
 public function test_create_xml()
 {
     $c = Unify::Create(['xml']);
     $this->assertEquals(true, $c->extensions()->exists('toXML'));
     $this->assertEquals(true, $c->extensions()->exists('addXML'));
     $this->assertEquals(true, $c->extensions()->exists('isXMLValid'));
 }
Exemplo n.º 2
0
 public function test_create_math()
 {
     $c = Unify::Create(['math']);
     $this->assertEquals(true, $c->extensions()->exists('sum'));
     $this->assertEquals(true, $c->extensions()->exists('avg'));
     $this->assertEquals(true, $c->extensions()->exists('min'));
     $this->assertEquals(true, $c->extensions()->exists('max'));
 }
Exemplo n.º 3
0
 public function test_create_toYaml_addYaml()
 {
     $c1 = Unify::Create(['yaml'])->offsetSet('name', 'value');
     $xamlString = $c1->toYaml();
     $c2 = Unify::Create(['yaml']);
     $c2->addYaml($xamlString);
     $this->assertEquals(true, is_string($xamlString));
     $this->assertEquals(true, $c2->offsetExists('name'));
     $this->assertEquals('value', $c2->name);
 }
Exemplo n.º 4
0
 public function test_create_operation()
 {
     $c = Unify::Create(['operation']);
     $this->assertEquals(true, $c->extensions()->exists('removeALL'));
     $this->assertEquals(true, $c->extensions()->exists('renameAll'));
     $this->assertEquals(true, $c->extensions()->exists('getFirst'));
     $this->assertEquals(true, $c->extensions()->exists('orderBy'));
     $this->assertEquals(true, $c->extensions()->exists('orderRandom'));
     $this->assertEquals(true, $c->extensions()->exists('limit'));
 }
Exemplo n.º 5
0
 public function test_create_json()
 {
     $c = Unify::Create(['json']);
     $this->assertEquals(true, $c->extensions()->exists('toJson'));
     $this->assertEquals(true, $c->extensions()->exists('addJson'));
 }