Skip to content

Commit 35349eb

Browse files
committed
Remove unused property $entityMapObserver
1 parent 3e2e42f commit 35349eb

File tree

1 file changed

+1
-32
lines changed

1 file changed

+1
-32
lines changed

tests/UnifiedSpecTests/UnifiedTestRunner.php

Lines changed: 1 addition & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -72,9 +72,6 @@ final class UnifiedTestRunner
7272
/** @var EntityMap */
7373
private $entityMap;
7474

75-
/** @var callable(EntityMap):void */
76-
private $entityMapObserver;
77-
7875
/** @var FailPointObserver */
7976
private $failPointObserver;
8077

@@ -113,31 +110,10 @@ public function run(UnifiedTestCase $test): void
113110

114111
throw $e;
115112
} finally {
116-
/* An EntityMap observer should be invoked irrespective of the test
117-
* succeeding or failing. Since the callable itself might throw, we
118-
* need to ensure doTearDown() will still be called. */
119-
try {
120-
if (isset($this->entityMapObserver, $this->entityMap)) {
121-
call_user_func($this->entityMapObserver, $this->entityMap);
122-
}
123-
} finally {
124-
$this->doTearDown($hasFailed);
125-
}
113+
$this->doTearDown($hasFailed);
126114
}
127115
}
128116

129-
/**
130-
* Defines a callable to receive the EntityMap after each test.
131-
*
132-
* This function is primarily used by the Atlas testing workload executor.
133-
*
134-
* @param callable(EntityMap):void $entityMapObserver
135-
*/
136-
public function setEntityMapObserver(callable $entityMapObserver): void
137-
{
138-
$this->entityMapObserver = $entityMapObserver;
139-
}
140-
141117
private function doSetUp(): void
142118
{
143119
/* The transactions spec advises calling killAllSessions only at the
@@ -193,13 +169,6 @@ private function doTestCase(stdClass $test, string $schemaVersion, ?array $runOn
193169

194170
$context = $this->createContext();
195171

196-
/* If an EntityMap observer has been configured, assign the Context's
197-
* EntityMap to a class property so it can later be accessed from run(),
198-
* irrespective of whether this test succeeds or fails. */
199-
if (isset($this->entityMapObserver)) {
200-
$this->entityMap = $context->getEntityMap();
201-
}
202-
203172
if (isset($createEntities)) {
204173
$context->createEntities($createEntities);
205174
}

0 commit comments

Comments
 (0)