Code Duplication    Length = 13-13 lines in 2 locations

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

@@ 485-497 (lines=13) @@
482
	}
483
484
485
	public function testPatchInvalidId()
486
	{
487
		$body = '{"data":{"id":-1}}';
488
		$header = array();
489
		$status = 500;
490
491
		$result = json_decode( $this->object->patch( $body, $header, $status ), true );
492
493
		$this->assertEquals( 400, $status );
494
		$this->assertEquals( 1, count( $header ) );
495
		$this->assertEquals( 0, $result['meta']['total'] );
496
		$this->assertArrayHasKey( 'errors', $result );
497
	}
498
499
500
	public function testPatchException()
@@ 625-637 (lines=13) @@
622
	}
623
624
625
	public function testPostInvalidId()
626
	{
627
		$body = '{"data":{"id":-1}}';
628
		$header = array();
629
		$status = 500;
630
631
		$result = json_decode( $this->object->post( $body, $header, $status ), true );
632
633
		$this->assertEquals( 403, $status );
634
		$this->assertEquals( 1, count( $header ) );
635
		$this->assertEquals( 0, $result['meta']['total'] );
636
		$this->assertArrayHasKey( 'errors', $result );
637
	}
638
639
640
	public function testPostException()