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 @@ -234,6 +234,12 @@ function testProject()
234234 */
235235 function testCandidate ()
236236 {
237+ $ mockdb = $ this ->getMockBuilder ("\Database " )->getMock ();
238+ $ this ->_factory ->setDatabase ($ mockdb );
239+ $ mockdb ->expects ($ this ->any ())
240+ ->method ('pselectRow ' )
241+ ->willReturn (['DCCID ' =>'300001 ' ]);
242+
237243 $ candID = new CandID ("300001 " );
238244 $ this ->assertEquals (
239245 Candidate::singleton ($ candID ),
@@ -250,6 +256,14 @@ function testCandidate()
250256 */
251257 function testTimepoint ()
252258 {
259+ $ mockdb = $ this ->getMockBuilder ("\Database " )->getMock ();
260+ $ mockconfig = $ this ->getMockBuilder ("\NDB_Config " )->getMock ();
261+ $ this ->_factory ->setConfig ($ mockconfig );
262+ $ this ->_factory ->setDatabase ($ mockdb );
263+ $ mockdb ->expects ($ this ->any ())
264+ ->method ('pselectRow ' )
265+ ->willReturn (['1 ' ]);
266+
253267 $ sessionID = new \SessionID ("1 " );
254268 $ this ->assertEquals (
255269 \TimePoint::singleton ($ sessionID ),
You can’t perform that action at this time.
0 commit comments