48 lines
2.1 KiB
YAML
48 lines
2.1 KiB
YAML
|
name: UnanimousStrategyTest
|
||
|
class_comment: "# * @author J\xE9r\xE9my Deruss\xE9 <jeremy@derusse.com>"
|
||
|
dependencies:
|
||
|
- name: TestCase
|
||
|
type: class
|
||
|
source: PHPUnit\Framework\TestCase
|
||
|
- name: UnanimousStrategy
|
||
|
type: class
|
||
|
source: Symfony\Component\Lock\Strategy\UnanimousStrategy
|
||
|
properties: []
|
||
|
methods:
|
||
|
- name: testMet
|
||
|
visibility: public
|
||
|
parameters:
|
||
|
- name: success
|
||
|
- name: failure
|
||
|
- name: total
|
||
|
- name: isMet
|
||
|
comment: "# * @author J\xE9r\xE9my Deruss\xE9 <jeremy@derusse.com>\n# */\n# class\
|
||
|
\ UnanimousStrategyTest extends TestCase\n# {\n# private UnanimousStrategy $strategy;\n\
|
||
|
# \n# protected function setUp(): void\n# {\n# $this->strategy = new UnanimousStrategy();\n\
|
||
|
# }\n# \n# public static function provideMetResults()\n# {\n# // success, failure,\
|
||
|
\ total, isMet\n# yield [3, 0, 3, true];\n# yield [2, 1, 3, false];\n# yield [2,\
|
||
|
\ 0, 3, false];\n# yield [1, 2, 3, false];\n# yield [1, 1, 3, false];\n# yield\
|
||
|
\ [1, 0, 3, false];\n# yield [0, 3, 3, false];\n# yield [0, 2, 3, false];\n# yield\
|
||
|
\ [0, 1, 3, false];\n# yield [0, 0, 3, false];\n# \n# yield [2, 0, 2, true];\n\
|
||
|
# yield [1, 1, 2, false];\n# yield [1, 0, 2, false];\n# yield [0, 2, 2, false];\n\
|
||
|
# yield [0, 1, 2, false];\n# yield [0, 0, 2, false];\n# }\n# \n# public static\
|
||
|
\ function provideIndeterminate()\n# {\n# // success, failure, total, canBeMet\n\
|
||
|
# yield [3, 0, 3, true];\n# yield [2, 1, 3, false];\n# yield [2, 0, 3, true];\n\
|
||
|
# yield [1, 2, 3, false];\n# yield [1, 1, 3, false];\n# yield [1, 0, 3, true];\n\
|
||
|
# yield [0, 3, 3, false];\n# yield [0, 2, 3, false];\n# yield [0, 1, 3, false];\n\
|
||
|
# yield [0, 0, 3, true];\n# \n# yield [2, 0, 2, true];\n# yield [1, 1, 2, false];\n\
|
||
|
# yield [1, 0, 2, true];\n# yield [0, 2, 2, false];\n# yield [0, 1, 2, false];\n\
|
||
|
# yield [0, 0, 2, true];\n# }\n# \n# /**\n# * @dataProvider provideMetResults"
|
||
|
- name: testCanBeMet
|
||
|
visibility: public
|
||
|
parameters:
|
||
|
- name: success
|
||
|
- name: failure
|
||
|
- name: total
|
||
|
- name: isMet
|
||
|
comment: '# * @dataProvider provideIndeterminate'
|
||
|
traits:
|
||
|
- PHPUnit\Framework\TestCase
|
||
|
- Symfony\Component\Lock\Strategy\UnanimousStrategy
|
||
|
interfaces: []
|