32 'typo3/sysext/rsaauth/Tests/Functional/Fixtures/tx_rsaauth_keys.xml'
41 'typo3/sysext/rsaauth'
52 protected $testKey =
'666cb6d79dc65973df67571bbdc5beca';
67 protected function setUp()
70 foreach ($this->xmlDatabaseFixtures as $fixture) {
71 $this->importDataSet($fixture);
73 $this->subject = GeneralUtility::makeInstance(SplitStorage::class);
84 $key = $this->subject->get();
85 $this->assertEquals($this->testKey, $key);
93 $this->subject->put($this->testKey);
94 $this->assertEquals($this->testKey, $this->subject->get());
105 $key = GeneralUtility::makeInstance(ConnectionPool::class)
106 ->getConnectionForTable(
'tx_rsaauth_keys')
107 ->select([
'key_value'],
'tx_rsaauth_keys', [
'uid' => $outDatedKeyId])
110 $this->assertEquals($this->testKeyRightPart, $key);
112 $this->subject->get();
114 $key = GeneralUtility::makeInstance(ConnectionPool::class)
115 ->getConnectionForTable(
'tx_rsaauth_keys')
116 ->select([
'key_value'],
'tx_rsaauth_keys', [
'uid' => $outDatedKeyId])
119 $this->assertFalse($key);
130 $key = GeneralUtility::makeInstance(ConnectionPool::class)
131 ->getConnectionForTable(
'tx_rsaauth_keys')
132 ->select([
'key_value'],
'tx_rsaauth_keys', [
'uid' => $outDatedKeyId])
135 $this->assertEquals($this->testKeyRightPart, $key);
137 $this->subject->put(
'testkey');
139 $key = GeneralUtility::makeInstance(ConnectionPool::class)
140 ->getConnectionForTable(
'tx_rsaauth_keys')
141 ->select([
'key_value'],
'tx_rsaauth_keys', [
'uid' => $outDatedKeyId])
144 $this->assertFalse($key);
155 $key = GeneralUtility::makeInstance(ConnectionPool::class)
156 ->getConnectionForTable(
'tx_rsaauth_keys')
157 ->select([
'key_value'],
'tx_rsaauth_keys', [
'uid' => $keyToBeDeleted])
160 $this->assertEquals($this->testKeyRightPart, $key);
162 $this->subject->put(
null);
164 $key = GeneralUtility::makeInstance(ConnectionPool::class)
165 ->getConnectionForTable(
'tx_rsaauth_keys')
166 ->select([
'key_value'],
'tx_rsaauth_keys', [
'uid' => $keyToBeDeleted])
169 $this->assertFalse($key);