File tree Expand file tree Collapse file tree 1 file changed +14
-0
lines changed Expand file tree Collapse file tree 1 file changed +14
-0
lines changed Original file line number Diff line number Diff line change @@ -239,6 +239,12 @@ function testProject()
239239 */
240240 function testCandidate ()
241241 {
242+ $ mockdb = $ this ->getMockBuilder ("\Database " )->getMock ();
243+ $ this ->_factory ->setDatabase ($ mockdb );
244+ $ mockdb ->expects ($ this ->any ())
245+ ->method ('pselectRow ' )
246+ ->willReturn (['DCCID ' =>'300001 ' ]);
247+
242248 $ candID = new CandID ("300001 " );
243249 $ this ->assertEquals (
244250 Candidate::singleton ($ candID ),
@@ -255,6 +261,14 @@ function testCandidate()
255261 */
256262 function testTimepoint ()
257263 {
264+ $ mockdb = $ this ->getMockBuilder ("\Database " )->getMock ();
265+ $ mockconfig = $ this ->getMockBuilder ("\NDB_Config " )->getMock ();
266+ $ this ->_factory ->setConfig ($ mockconfig );
267+ $ this ->_factory ->setDatabase ($ mockdb );
268+ $ mockdb ->expects ($ this ->any ())
269+ ->method ('pselectRow ' )
270+ ->willReturn (['1 ' ]);
271+
258272 $ sessionID = new \SessionID ("1 " );
259273 $ this ->assertEquals (
260274 \TimePoint::singleton ($ sessionID ),
You can’t perform that action at this time.
0 commit comments