Code Duplication    Length = 15-15 lines in 3 locations

admin/jsonadm/tests/Admin/JsonAdm/StandardTest.php 3 locations

@@ 76-90 (lines=15) @@
73
	}
74
75
76
	public function testDeleteInvalid()
77
	{
78
		$body = '{"data":null}';
79
		$header = array();
80
		$status = 500;
81
82
		$result = json_decode( $this->object->delete( $body, $header, $status ), true );
83
84
		$this->assertEquals( 400, $status );
85
		$this->assertEquals( 1, count( $header ) );
86
		$this->assertEquals( 0, $result['meta']['total'] );
87
		$this->assertArrayHasKey( 'errors', $result );
88
		$this->assertArrayNotHasKey( 'included', $result );
89
		$this->assertArrayNotHasKey( 'data', $result );
90
	}
91
92
93
	public function testDeleteException()
@@ 468-482 (lines=15) @@
465
	}
466
467
468
	public function testPatchInvalid()
469
	{
470
		$body = '{"data":null}';
471
		$header = array();
472
		$status = 500;
473
474
		$result = json_decode( $this->object->patch( $body, $header, $status ), true );
475
476
		$this->assertEquals( 400, $status );
477
		$this->assertEquals( 1, count( $header ) );
478
		$this->assertEquals( 0, $result['meta']['total'] );
479
		$this->assertArrayHasKey( 'errors', $result );
480
		$this->assertArrayNotHasKey( 'included', $result );
481
		$this->assertArrayNotHasKey( 'data', $result );
482
	}
483
484
485
	public function testPatchInvalidId()
@@ 608-622 (lines=15) @@
605
	}
606
607
608
	public function testPostInvalid()
609
	{
610
		$body = '{"data":null}';
611
		$header = array();
612
		$status = 500;
613
614
		$result = json_decode( $this->object->post( $body, $header, $status ), true );
615
616
		$this->assertEquals( 400, $status );
617
		$this->assertEquals( 1, count( $header ) );
618
		$this->assertEquals( 0, $result['meta']['total'] );
619
		$this->assertArrayHasKey( 'errors', $result );
620
		$this->assertArrayNotHasKey( 'included', $result );
621
		$this->assertArrayNotHasKey( 'data', $result );
622
	}
623
624
625
	public function testPostInvalidId()