mirror of
https://github.com/barryvdh/laravel-ide-helper.git
synced 2026-08-18 01:57:13 +00:00
Fix upstream dependent test failure (#1595)
This commit is contained in:
+11
-10
@@ -59,27 +59,28 @@ DOC;
|
|||||||
public function testEloquentBuilderOutput()
|
public function testEloquentBuilderOutput()
|
||||||
{
|
{
|
||||||
$reflectionClass = new \ReflectionClass(Builder::class);
|
$reflectionClass = new \ReflectionClass(Builder::class);
|
||||||
$reflectionMethod = $reflectionClass->getMethod('with');
|
$reflectionMethod = $reflectionClass->getMethod('upsert');
|
||||||
|
|
||||||
$method = new Method($reflectionMethod, 'Builder', $reflectionClass);
|
$method = new Method($reflectionMethod, 'Builder', $reflectionClass);
|
||||||
|
|
||||||
$output = <<<'DOC'
|
$output = <<<'DOC'
|
||||||
/**
|
/**
|
||||||
* Set the relationships that should be eager loaded.
|
* Insert new records or update the existing ones.
|
||||||
*
|
*
|
||||||
* @param string|array $relations
|
* @param array $values
|
||||||
* @param string|\Closure|null $callback
|
* @param array|string $uniqueBy
|
||||||
* @return \Illuminate\Database\Eloquent\Builder|static
|
* @param array|null $update
|
||||||
|
* @return int
|
||||||
* @static
|
* @static
|
||||||
*/
|
*/
|
||||||
DOC;
|
DOC;
|
||||||
$this->assertSame($output, $method->getDocComment(''));
|
$this->assertSame($output, $method->getDocComment(''));
|
||||||
$this->assertSame('with', $method->getName());
|
$this->assertSame('upsert', $method->getName());
|
||||||
$this->assertSame('\\' . Builder::class, $method->getDeclaringClass());
|
$this->assertSame('\\' . Builder::class, $method->getDeclaringClass());
|
||||||
$this->assertSame('$relations, $callback', $method->getParams(true));
|
$this->assertSame('$values, $uniqueBy, $update', $method->getParams(true));
|
||||||
$this->assertSame(['$relations', '$callback'], $method->getParams(false));
|
$this->assertSame(['$values', '$uniqueBy', '$update'], $method->getParams(false));
|
||||||
$this->assertSame('$relations, $callback = null', $method->getParamsWithDefault(true));
|
$this->assertSame('$values, $uniqueBy, $update = null', $method->getParamsWithDefault(true));
|
||||||
$this->assertSame(['$relations', '$callback = null'], $method->getParamsWithDefault(false));
|
$this->assertSame(['$values', '$uniqueBy', '$update = null'], $method->getParamsWithDefault(false));
|
||||||
$this->assertTrue($method->shouldReturn());
|
$this->assertTrue($method->shouldReturn());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user