Lines Matching refs:count
29 * @covers ::count
33 $this->assertSame(0, $this->object->count(''));
34 $this->assertSame(0, $this->object->count(' '));
35 $this->assertSame(0, $this->object->count("\n"));
39 * @covers ::count
43 $this->assertSame(1, $this->object->count('Hello'));
44 $this->assertSame(1, $this->object->count('Hello.'));
45 $this->assertSame(1, $this->object->count('Hello...'));
46 $this->assertSame(1, $this->object->count('Hello!'));
47 $this->assertSame(1, $this->object->count('Hello?'));
48 $this->assertSame(1, $this->object->count('Hello?!'));
52 * @covers ::count
56 $this->assertSame(1, $this->object->count('Hello world'));
57 $this->assertSame(1, $this->object->count('Hello world.'));
58 $this->assertSame(1, $this->object->count('Hello world...'));
59 $this->assertSame(1, $this->object->count('Hello world!'));
60 $this->assertSame(1, $this->object->count('Hello world?'));
61 $this->assertSame(1, $this->object->count('Hello world?!'));
65 * @covers ::count
69 $this->assertSame(2, $this->object->count('Hello world. Are you there'));
70 $this->assertSame(2, $this->object->count('Hello world. Are you there?'));
71 $this->assertSame(1, $this->object->count('Hello world, Are you there?'));
72 $this->assertSame(1, $this->object->count('Hello world: Are you there?'));
73 $this->assertSame(1, $this->object->count('Hello world... Are you there?'));
77 * @covers ::count
81 $this->assertSame(2, $this->object->count("Hello world...\rAre you there?"));
82 $this->assertSame(2, $this->object->count("Hello world...\nAre you there?"));
83 $this->assertSame(2, $this->object->count("Hello world...\r\nAre you there?"));
84 $this->assertSame(2, $this->object->count("Hello world...\r\n\rAre you there?"));
85 $this->assertSame(2, $this->object->count("Hello world...\n\r\nAre you there?"));
86 $this->assertSame(2, $this->object->count("Hello world...\n\nAre you there?"));
87 $this->assertSame(2, $this->object->count("Hello world...\r\rAre you there?"));
91 * @covers ::count
95 $this->assertSame(1, $this->object->count("Hello mr. Smith."));
96 $this->assertSame(1, $this->object->count("Hello, OMG Kittens!"));
97 $this->assertSame(1, $this->object->count("Hello, abbrev. Kittens!"));
98 $this->assertSame(1, $this->object->count("Hello, O.M.G. Kittens!"));
99 $this->assertSame(1, $this->object->count("Last week, former director of the A.B.C. John B. Smith was fired."));
100 $this->assertSame(1, $this->object->count("Mr. Smith was not available for comment.."));
104 * @covers ::count
108 $this->assertSame(2, $this->object->count("Hello there. Brave new world."));
109 $this->assertSame(1, $this->object->count("Hello there... Brave new world."));
110 $this->assertSame(2, $this->object->count("Hello there?... Brave new world."));
111 $this->assertSame(2, $this->object->count("Hello there!... Brave new world."));
112 $this->assertSame(2, $this->object->count("Hello there!!! Brave new world."));
113 $this->assertSame(2, $this->object->count("Hello there??? Brave new world."));
117 * @covers ::count
121 $this->assertSame(2, $this->object->count("You? Smith?"));
122 $this->assertSame(2, $this->object->count("You there? Smith?"));
123 $this->assertSame(1, $this->object->count("You mr. Smith?"));
124 $this->assertSame(2, $this->object->count("Are you there. Mister Smith?"));
125 $this->assertSame(2, $this->object->count("Are you there. Smith, sir?"));
126 $this->assertSame(2, $this->object->count("Are you there. Mr. Smith?"));
236 $this->assertSame(1, $this->object->count("The price is £25.50, including postage and packing."));
237 $this->assertSame(1, $this->object->count("The price is 25.50, including postage and packing."));
238 $this->assertSame(1, $this->object->count("I went true to size at 10.5 cms."));
239 $this->assertSame(2, $this->object->count("The prices are £25.50 or £27.50, including postage and packing. I went true to size at 10.5 cms."));
256 $this->assertSame(count($expected), $this->object->count($text));