assertSame([], $dbo->getArray()); } public function testArrayString() { $dbo = LuIntDboArray::jsonDeserialize(["42"]); $this->assertSame([42], $dbo->getArray()); } public function testArrayMultipleString() { $dbo = LuIntDboArray::jsonDeserialize(["42", "24", "48"]); $this->assertSame([42, 24, 48], $dbo->getArray()); } public function testArrayInt() { $dbo = LuIntDboArray::jsonDeserialize([42]); $this->assertSame([42], $dbo->getArray()); } public function testArrayMultipleInt() { $dbo = LuIntDboArray::jsonDeserialize([42, 24, 48]); $this->assertSame([42, 24, 48], $dbo->getArray()); } public function testArrayStringIntPlusData() { $this->expectException(AbortException::class); LuIntDboArray::jsonDeserialize(["42test"]); } public function testArrayMultipleStringIntPlusData() { $this->expectException(AbortException::class); LuIntDboArray::jsonDeserialize(["42", 42, "42test"]); } public function testIntString() { $this->expectException(AbortException::class); LuIntDboArray::jsonDeserialize("42"); } public function testInt() { $this->expectException(AbortException::class); LuIntDboArray::jsonDeserialize(42); } public function testIntNegativeString() { $this->expectException(AbortException::class); LuIntDboArray::jsonDeserialize("-42"); } public function testIntNegative() { $this->expectException(AbortException::class); LuIntDboArray::jsonDeserialize(-42); } public function testFloat() { $this->expectException(AbortException::class); LuIntDboArray::jsonDeserialize(42.42); } public function testFloatString() { $this->expectException(AbortException::class); LuIntDboArray::jsonDeserialize("42.42"); } public function testExponentialString() { $this->expectException(AbortException::class); LuIntDboArray::jsonDeserialize("42e+01"); } public function testBool() { $this->expectException(AbortException::class); LuIntDboArray::jsonDeserialize(true); } public function testBoolString() { $this->expectException(AbortException::class); LuIntDboArray::jsonDeserialize("true"); } public function testArrayFloat() { $this->expectException(AbortException::class); LuIntDboArray::jsonDeserialize([42.42]); } public function testNull() { $this->expectException(AbortException::class); LuIntDboArray::jsonDeserialize(null); } public function testObject() { $this->expectException(AbortException::class); LuIntDboArray::jsonDeserialize(new self()); } }