/**
  * @covers ::getObjectFromCache
  * @covers ::setObjectInCache
  * @covers ::fromObject
  */
 public function testReadsObjectResultsFromAnInternalCache()
 {
     $target = new CallableMethodsListTest_Target1();
     $expectedMethods = ['garbageMethod1' => 'staticMethod1'];
     // put the data into the cache
     InvokeMethod::onString(CallableMethodsList::class, 'setObjectInCache', [$target, $expectedMethods]);
     // ----------------------------------------------------------------
     // perform the change
     $actualMethods2 = CallableMethodsList::fromObject($target);
     // ----------------------------------------------------------------
     // test the results
     // this proves that the data we expect is in the internal cache
     $actualMethods1 = InvokeMethod::onString(CallableMethodsList::class, 'getObjectFromCache', [$target]);
     $this->assertEquals($expectedMethods, $actualMethods1);
     // this proves that CallableMethodsList uses the internal cache
     // when data is present
     $this->assertEquals($expectedMethods, $actualMethods2);
 }