public function testGetSizeWithoutSizeShouldReturnExpectedValue() { $payload = $this->mockPayloadFolder(array('size' => 123)); $client = $this->mockClient(array('fetchProperties' => function ($expectation) use($payload) { $expectation->andReturn($payload); })); $object = new TestObject($client, 'file.ffffffffffffffff.FFFFFFFFFFFFFFFF!123'); $actual = $object->getSize(); $this->assertEquals(123, $actual); }