getFileName(); $this->assertNotFalse($file); $lines = file($file, FILE_IGNORE_NEW_LINES); $this->assertIsArray($lines); $slice = array_slice($lines, $ref->getStartLine() - 1, $ref->getEndLine() - $ref->getStartLine() + 1); return implode("\n", $slice); } public function testGetUserCardListFastBuyUsesRedisBucketPath(): void { $body = $this->methodBody(UserDiscount::class, 'getUserCardList'); $this->assertStringContainsString('getFastBuyCartdataList', $body); $this->assertStringContainsString('fastbuy', $body); } public function testGetUserCardListCartModeStillUsesOperatorCartList(): void { $body = $this->methodBody(UserDiscount::class, 'getUserCardList'); $this->assertStringContainsString('getCartdataList', $body); } }