-
Notifications
You must be signed in to change notification settings - Fork 12
test: Product Relation Mapper #11
test: Product Relation Mapper #11
Conversation
use PHPUnit\Framework\MockObject\MockObject; | ||
use PHPUnit\Framework\TestCase; | ||
|
||
class AbstractProductRelationAttributeCase extends TestCase |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
class AbstractProductRelationAttributeCase extends TestCase | |
abstract class AbstractProductRelationMapperAttributeCase extends TestCase |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actually, this should fail(via warning) as you have no tests in your class
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ahhh it does not have Test suffix so that's the reason probably :)
|
||
protected function getProductCrossSellingClass(): AbstractProductCrossSelling | ||
{ | ||
return new class( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Weirdo formatting
|
||
public function testNoAttribute(): void | ||
{ | ||
$this->product->expects(self::once())->method('hasAttribute')->willReturn(false); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's a fake test. It should test method output, not the fact a method is called once
No description provided.