/** * @covers WindowsAzure\Table\TableRestProxy::insertOrReplaceEntity */ public function testInsertOrReplaceEntityOptionsNull() { $table = TableServiceFunctionalTestData::$TEST_TABLE_NAMES[0]; try { $this->restProxy->insertOrReplaceEntity($table, TableServiceFunctionalTestData::getSimpleEntity(), null); $this->assertFalse(Configuration::isEmulated(), 'Should fail if and only if in emulator'); } catch (ServiceException $e) { // Expect failure when run this test with emulator, as v1.6 doesn't support this method if (Configuration::isEmulated()) { $this->assertEquals(404, $e->getCode(), 'getCode'); } } $this->clearTable($table); }
/** * @covers WindowsAzure\Table\TableRestProxy::insertOrReplaceEntity */ public function testInsertOrReplaceEntityOptionsNull() { $table = TableServiceFunctionalTestData::$testTableNames[0]; try { $this->restProxy->insertOrReplaceEntity($table, TableServiceFunctionalTestData::getSimpleEntity(), null); $this->assertFalse($this->isEmulated(), 'Should fail if and only if in emulator'); } catch (ServiceException $e) { // Expect failure when run this test with emulator, as v1.6 doesn't support this method if ($this->isEmulated()) { $this->assertEquals(TestResources::STATUS_NOT_FOUND, $e->getCode(), 'getCode'); } } $this->clearTable($table); }